swift禁止横屏

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

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

    {  

         return UIInterfaceOrientationMaskPortrait;  

    }

 

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

posted @ 2015-12-21 17:18  CJDanger  阅读(805)  评论(0编辑  收藏  举报