2012-02-24 62 views
0

我有一个UIViewController呈现一个模式视图控制器,当我旋转模态视图控制器它不叫viewWilLRotate,didRotateToInterface和willAnimateToInterface ...的UIViewController中的呈现这一模式的看法。为什么是这样?如果我改变模态视图控制器的方向并关闭它,这会导致我的iPhone视图被搞乱。presentModalViewController不叫viewWillRotate,didRotateToInterface

+0

你能告诉我们一些代码吗? – Andrew 2012-02-24 06:39:39

回答

0

在母体的viewController,检查是否

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 

返回YES或不或在视图层次检查它。你必须返回你想要的是或方向。