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
