基于Autolayout的动画

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

[UIView animateWithDuration:1.0 animations:^{

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

}];

原文地址:https://www.cnblogs.com/xufengyuan/p/6855780.html