OC中禁止横屏一般是在delegate.m中修改,如:

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  

    {  

         return UIInterfaceOrientationMaskPortrait;  

    }

 

但是在swift中,禁止横屏就只能在(目前我所知道的)plist文件中修改.如图,删除掉红色框的两项即可.

转载于:https://www.cnblogs.com/changjianioser/p/5064042.html

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐