ios如何让启动页(闪屏页)强制竖屏,而进入App后允许横屏和竖

2017-08-02  本文已影响597人  WSGNSLog

1、修改App-info.plist(在XCode中General中设置 一样的效果)

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>

2、AppDelegate中:

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
  return UIInterfaceOrientationMaskAllButUpsideDown;
}

参考:https://www.coder4.com/archives/5406

上一篇 下一篇

猜你喜欢

热点阅读