On iPhone - my first ViewController
supports all interface orientations. Initial behavior though, is when I launch the app the main ViewController
should always be in portrait.
In order to overcome situations where the phone was in landscape while the app was launched, I created a dummy ViewController
which only supported portrait orientation, launched the app from it and immediately pushed the main ViewController
. Indeed the main ViewController
was in portrait orientation, but when performing:
self.interfaceOrientation
The result was landscape orientation (like the phone's orientation).
I would expect it to return portrait, and this is causing problems.
How can I get the true orientation of the ViewController
and not the device in this case?