在APPDelegate中添加如下代码
 
 

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{

    if (kIsIpad) {     // iPad 支持旋转屏幕

        return UIInterfaceOrientationMaskAll;

    }

    

    // iPhone 只支持竖屏

    return UIInterfaceOrientationMaskPortrait;

}

posted on 2016-11-22 18:23  怡情_老二  阅读(461)  评论(0编辑  收藏  举报