【发布时间】:2014-01-31 13:16:57
【问题描述】:
我不知道如何在 iOS7 中设置 NSLayoutConstraint 动画持续时间。这是我的代码:
self.loadingViewTop.constant = -[[UIScreen mainScreen] bounds].size.height;
self.loadingViewBottom.constant = [[UIScreen mainScreen] bounds].size.height;
[UIView animateWithDuration:30.0f animations:^{
[self.loadingView setNeedsUpdateConstraints];
}];
【问题讨论】:
-
@iiFreeman 我试过了。实际上,如果您删除 [UIView animateWithDuration] 代码,视图仍然会设置动画。我看不到任何可能的解决方案如何控制它。
标签: objective-c animation ios7 duration nslayoutconstraint