I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView
appears as a child view in the nav controller. But the
To addon to the already answered question:
You use [[UIDevice currentDevice] orientation]
which will yield one of these values:
typedef enum {
UIDeviceOrientationUnknown,
UIDeviceOrientationPortrait,
UIDeviceOrientationPortraitUpsideDown,
UIDeviceOrientationLandscapeLeft,
UIDeviceOrientationLandscapeRight,
UIDeviceOrientationFaceUp,
UIDeviceOrientationFaceDown
} UIDeviceOrientation;
The documentation can be found here - (orientation) and here - (UIDeviceOrientation).
(I don't mean to claim the former anwser, but this information was to big for a comment.)