2012-02-24 64 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或不或在視圖層次檢查它。你必須返回你想要的是或方向。