liujxbky

关于iPad横屏设置

1.项目需要:iPad支持横屏,iPhone支持竖屏,

 (1)

(2)在info。plist里面设置View controller-based status bar appearance为NO。

 (3)这样iPad运行为横屏显示,在不需要显示状态栏的情况下,在ViewController设置

    self.navigationController.navigationBar.hidden = YES;

 (4)iphone的RootVIewCOntroller中设置:

-(UIStatusBarStyle)preferredStatusBarStyle{

 

    return UIStatusBarStyleLightContent;

}

-(BOOL) shouldAutorotate{

 

    return NO;

}

-(UIInterfaceOrientationMask)supportedInterfaceOrientations{

 

    return UIInterfaceOrientationMaskLandscapeLeft|UIInterfaceOrientationMaskPortrait;

    

}

OVER

发表于 2017-08-14 09:01  刘金晓  阅读(1434)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2021-06-25
  • 2021-12-14
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案