장치가 가로 모드 인 경우 ModalViewController A를 밀어 내 기본 ViewController에서 -orientationChanged를 무시합니다. 다시 portrait 모드로 전환하면 ModalViewController A가 닫힙니다. 그러나 ModalViewControllerB, C 또는 D가 표시된 다른 경우 (단추를 누른 후)가 있습니다. 그것들이 보여 질 때, 장치가 가로 방향으로 돌아가고 되돌아 가면, ModalViewController B C 또는 D는 부적절하게 닫혀 버립니다.ModalViewController가 표시되는지 어떻게 알 수 있습니까?
ModalViewController가 표시된 경우에도 내 ViewController에서 -orientationChanged가 메시지로 보내지는지 확인할 수 있습니다. ModalViewController B C 또는 D가 표시 될 때 해당 코드를 무시하도록 -orientationChanged 메서드에 추가 할 수있는 조건이 있습니까?
감사합니다.
감사합니다. 나는 조건부를 사용했다 : if ([self.modalViewController isMemberOfClass : [UINavigationController class]]) ... – ed94133