I want to lock single viewcontroller in iPhone and iPad. This below code is working perfectly in iPhone 4,5,6 iPad, iPad 2 ,iPad retina. But not working in iPad pro.
@implementation UINavigationController (Orientation)
-(NSUInteger)supportedInterfaceOrientations
{
return [self.topViewController supportedInterfaceOrientations];
}
-(BOOL)shouldAutorotate
{
return YES;
}
@end
This above code is written in my view controller which view controller i do not want to rotate.