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

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

作者: WSGNSLog | 来源:发表于2017-08-02 15:09 被阅读597次

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

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/sjtylxtx.html