基于Autolayout的动画

在修改了约束之后,只要执行下面代码,就能做动画效果

[UIView animateWithDuration:1.0 animations:^{

    [添加了约束的view的父控件 layoutIfNeeded];

}];

posted @ 2017-05-15 11:55  iFat  阅读(112)  评论(0编辑  收藏  举报