【发布时间】:2015-09-13 12:16:32
【问题描述】:
我以通常的方式为约束设置动画:
centerXsettingsBtnConstraint.constant = aValue;
[UIView animateWithDuration:.5
animations:^{
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
isAnimating = NO;}];
当我旋转设备时,我想取消此动画并使用新值更新约束。
我试着打电话
[self.view.layer removeAllAnimations];
但动画仍然继续,直到设备的旋转结束。只有这样我才能使用新的约束进行更新,但是在旋转过程中,屏幕上一片混乱。
有没有办法取消约束动画?
【问题讨论】:
标签: ios xcode6 autolayout uiviewanimation