You have to redefine an other NavigationController and block the rotation you want. And when you want to push your view controller , call the other Navigation Controller.
YourCustomNavigationController *kiwappNav = [[YourCustomNavigationController alloc] initWithRootViewController:yourViewController];
[self.navigationController pushViewController:kiwappNav animated:YES];
and your custom navigationController for example :
#pragma mark - Orientation
- (BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
switch ([Device getDeviceFormat])
{
case DF_IPAD:
return UIInterfaceOrientationMaskAll;
break;
case DF_IPOD:
return UIInterfaceOrientationMaskPortrait;
break;
default:
return UIInterfaceOrientationMaskAll;
break;
}
}
Hope it will help you.