我不知道如何在 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];
}];
最佳答案
哦,你忘了在动画 block 内调用[self.view layoutIfNeeded];
关于objective-c - iOS7 中的 NSLayoutConstraint 动画持续时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21481014/