Basically I want my application to show in portrait, but the user can manually change the orientation of the interface in some ViewControllers.
MyNavigationVC → press VC1 in portrait → press VC2 in portrait mode by default → click button to go to landscape.
So, I check the orientation of the device on portrait, landscape left, landscape rightin the .plist file. And in the topmost navigation controller, I redefine the method as follows:
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
, , VC1 , VC2 , FullScreen, . , :
- (void)onFullScreenButtonTouchUpInside:(id)sender
{
[self changeViewFrameToFullScreen];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
}
iOS6/7, iOS8.
iOS 8 .
iOS 8 , . ( ), .
iOS 8? , ? .