Return NO
for shouldAutorotate
:
-(BOOL)shouldAutorotate {
return NO;
}
Or if it is YES
you need to return the supportedInterfaceOrientations
(at least one), here its only allowing portrait:
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
return UIInterfaceOrientationMaskAll;
}
}