You can use this method in ur AppDelegate Class for and maintain with bool var
-(NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
if(self.isDisplayInPoratrait){
return UIInterfaceOrientationMaskPortrait;
else
// return ur required orientation
}
self.isDisplayInPoratrait
is bool variable declared in AppDelagate
set this variable yes in class which u want to present in portrait. Place this method in class which u wan to present in portrait
-(BOOL)shouldAutorotate {
return NO;
}
-(UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationLandscapeLeft;
}