Have you tried checking device orientation by using UIDevice class?
Edited:
First add an observer to monitor orientation change:
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(orientationDidChange:)
name:UIDeviceOrientationDidChangeNotification object:nil];
}
In the callback, obtain current device orientation
- (void)orientationDidChange:(NSNotification*)notification
{
/// check current orientation
switch ([[UIDevice currentDevice] orientation])
{
case UIDeviceOrientationPortrait:
break;
case UIDeviceOrientationPortraitUpsideDown:
break;
case UIDeviceOrientationLandscapeLeft:
break;
case UIDeviceOrientationLandscapeRight:
break;
case UIDeviceOrientationFaceUp:
break;
case UIDeviceOrientationFaceDown:
break;
default: /// UIDeviceOrientationUnknown
break;
}
}
This will notify you whenever the device changes it's orientation.
Supported orientations can be found here:
https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html