I want only portrait orientation only in one view controller. I am doing this :
-(BOOL)shouldAutorotate{
return NO;
}
-(NSInteger)supportedInterfaceOrientations:(UIWindow *)window{
// UIInterfaceOrientationMaskLandscape;
// 24
//
// UIInterfaceOrientationMaskLandscapeLeft;
// 16
//
// UIInterfaceOrientationMaskLandscapeRight;
// 8
//
// UIInterfaceOrientationMaskPortrait;
// 2
// return UIInterfaceOrientationMaskLandscape;
return 2;
}
No success !!
I have tried many permutations and combinations as suggested on google but still not working.