2013-03-04 31 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使用的一些性能优化提示的问题。

相关问题