在APPDelegate中添加如下代码
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
if (kIsIpad) { // iPad 支持旋转屏幕
return UIInterfaceOrientationMaskAll;
}
// iPhone 只支持竖屏
return UIInterfaceOrientationMaskPortrait;
}
浙公网安备 33010602011771号