我重寫-orientationChanged在我的主視圖控制器推ModalViewController一個當設備處於橫向模式。當放回肖像模式時,ModalViewController A被解除。但是,在顯示ModalViewControllers B,C或D的地方還有其他一些情況(按鈕觸摸後)。當顯示這些設備時,如果設備轉爲橫向並返回,則ModalViewController B C或D將被不正確地解散。如何知道是否顯示ModalViewController?
我可以驗證-orientationChanged我的主視圖控制器,即使當顯示ModalViewController正在傳遞消息。當顯示ModalViewController B C或D時,是否有條件可以添加到我的-orientationChanged方法中以繞過該代碼?
謝謝!
謝謝,這個工作。我使用的條件:if([self.modalViewController isMemberOfClass:[UINavigationController class]])... – ed94133 2010-08-21 23:06:40