1.

对于做视频横屏播放的情况下:做旋转有3种方法。

第一种:就是网上说的用旋转矩阵方法CGAffineTransformMakeRotation来做,直接旋转某个view,之后setFrame,至于状态栏,全屏横屏之后就隐藏吧。这种方法有个弊端是音量图标不能随着一起旋转,QA到时候会挑BUG。

第二种:就是打开工程设置前面也说了弄个导航控制器。

第三种:就是前面说的- (NSUInteger)application:(UIApplication *)applicationsupportedInterfaceOrientationsForWindow:(UIWindow *)window方法。

 https://blog.csdn.net/returningprodigal/article/details/51830909

 

2.

-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    if (self.isForceLandscape) {
        return UIInterfaceOrientationMaskLandscape;
    }else if (self.isForcePortrait){
        return UIInterfaceOrientationMaskPortrait;
    }
    return UIInterfaceOrientationMaskAll;
}

 

https://blog.csdn.net/ghl2318560278/article/details/51579814

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-04
  • 2021-10-29
猜你喜欢
  • 2021-06-13
  • 2021-11-12
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案