有什么方法可以在- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
之前执行?在willAnimateRotationToInterfaceOrientation之前执行的任何方法?
这对我来说非常重要,因为在执行此方法之前,它好像视图坐标系切换。我正试图在系统决定旋转设备之前立即执行一个方法,因此沿着- (BOOL)shouldAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
的行似乎是执行这种方法的理想场所(但它似乎并不存在于文档中) 。
谢谢!
请参阅我的讨论,了解您可能想要做的事情的实际示例:http://www.apeth.com/iOSBook/ch19.html#SECrotationevents它显示了如何执行它是你的方式,但它也继续展示如何更好地使用约束。约束方式很好地传递给iOS 8,但“willRotate”方式不适用。 – matt 2014-10-10 15:09:35