转载:http://blog.csdn.net/hengshujiyi/article/details/10094917
在AppDelegate中增加,这个方法可以禁止横屏
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}