OC中禁止横屏一般是在delegate.m中修改,如:
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}
但是在swift中,禁止横屏就只能在(目前我所知道的)plist文件中修改.如图,删除掉红色框的两项即可.
原文:http://www.cnblogs.com/changjianioser/p/5064042.html