有什麼方法可以在- (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