如题,最近一个app架构为 nav + tabbar ,需求是 在点击tabbar中的一个菜单项时,弹出网页,该网页需要横屏显示,其他页面不变  都保持竖屏。

XCode Version 7.2.1

 

 

网上一搜,都说到在nav或者tabbar中设置以下3个方法。

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait ;
}
- (BOOL)shouldAutorotate
{
    return NO;
}
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationPortrait;
}
View Code

相关文章:

  • 2022-02-11
  • 2021-05-31
  • 2022-02-09
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2021-10-09
  • 2021-09-22
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
相关资源
相似解决方案