2013-03-04 28 views
0

所以它看起來像我第一次推一個UIViewController我的UINavigationController堆棧這種方法被稱爲:的iOS 5.1 shouldAutorotateToInterfaceOrientation:調用,但didRotateFromInterfaceOrientation:是不是第一次加載

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 

但這種方法是不是:

-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 

現在,如果我加載UIViewContoller後旋轉設備,那麼這兩個都按預期發射。

爲什麼didRotateFromInterfaceOrientation沒有被調用時,我的控制器的負荷?

+0

那麼問題是什麼? – 2013-03-04 17:24:54

+0

剛更新的問題 – Slee 2013-03-04 17:34:31

回答

0

UIViewController Class Reference來自:

didRotateFromInterfaceOrientation:

用戶接口旋轉之後發送到視圖控制器。

didRotateFromInterfaceOrientation在加載過程中沒有被調用,因爲沒有用戶界面旋轉。

shouldAutorotateToInterfaceOrientation在每次旋轉之前被調用。我不知道爲什麼它在加載過程中被調用。我認爲這可能是由UINavigationViewController使用的一些性能優化提示的問題。

相關問題