How to Force iPhone to Check Orientation
- by Shannon A.
Here's the problem:
View Controller #1 only runs in the two landscape orientations.
View Controller #2 runs in any orientation.
When view controller #2 is pushed on top of view controller #1 (using presentModalViewController:animated:, as it happens), there's no check for orientation. Instead, VC #2 just assumes the orientation is whichever landscape orientation VC #1 is currently in.
This behavior is incorrect if the user happens to be holding the iPhone in a portrait orientation, despite the fact that he's viewing VC #1 where it's not supported. This can easily happen during startup, so it's not just a theoretical question.
Is there any way to tell VC #2 to recheck what it's orientation actually is? If so, where would it be best placed? viewDidLoad?