陈斌彬的技术博客

Stay foolish,stay hungry

iOS禁止横屏

在appDelegate.m中写上这一句

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window 
{ 
     return UIInterfaceOrientationMaskPortrait; 
}