Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 UIViewController 子类,它可以显示动画(主要是改变 imageview 子视图上的 alpha)。如果在设备旋转时出现动画,我希望在当前动画块完成后出现旋转动画。我怎样才能做到这一点?
当您调用为图像设置动画的方法时,将某个 BOOLean 值设置为 NO 并有条件地允许该-shouldAutorotateToInterfaceOrientation方法中的旋转。像这样的东西:
-shouldAutorotateToInterfaceOrientation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (!someBool) return NO; return YES; }