Solve the problem of horizontal screen first
1. Project Settings only support vertical screen
The 2.AppDelegate window setting supports all
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskAll;}
3.UINavigationController or Baseviewcontroller only support vertical screen
(This ensures that the application supports horizontal screen, and the usual VC is vertical screen, and then to cross-screen VC present out)
- (BOOL)shouldAutorotate{ return YES;}- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskPortrait;}
4. Player interface present out, support the screen
-(BOOL)shouldAutorotate{ return YES;}
- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskAll;}
Player interface present out, support horizontal screen
-(BOOL)shouldAutorotate{ return YES;}
- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscape;}
Status bar set above ios7.0
-(void ) Playerviewdelegatesetstatusbarhiden: (bool) is_hiden{ Self.stauts_bar_hiden = Is_hiden; [self Prefersstatusbarhidden]; //hide or show //update StatusBar [self Performselector: @selector (setneedsstatusbarappearanceupdate)]; //Refresh status bar}-(bool) prefersstatusbarhidden{return self.stauts_bar_hiden;}
Turn from: blog.csdn.net/u012241552/article/details/49023729
iOS Cross screen issues