我無法弄清楚如何在iOS7中設置NSLayoutConstraint動畫持續時間。這裏是我的代碼:NSLayoutConstraint動畫持續時間iOS7
self.loadingViewTop.constant = -[[UIScreen mainScreen] bounds].size.height;
self.loadingViewBottom.constant = [[UIScreen mainScreen] bounds].size.height;
[UIView animateWithDuration:30.0f animations:^{
[self.loadingView setNeedsUpdateConstraints];
}];
可能重複(http://stackoverflow.com/questions/12926566/are-nslayoutconstraints-animatable) – Wain
@iiFreeman我試過了。實際上如果你刪除[UIView animateWithDuration]代碼,視圖仍然動畫。我看不到任何可能的解決方案如何控制它。 – Dmitry