I'm trying to disable landscape mode for my app and I turned off the settings here
我正在尝试为我的应用禁用横向模式,我在这里关闭了设置
This turns off landscape for the iPhone but not for the iPad, so I went into the info.plist and tried removing the last two but when I submitted the build to iTunes Connect it said they need to be there... So I don't know if there's a way to disable horizontal mode for the iPad? I want portrait mode to be the only thing on iPhone and iPad.
这会关闭iPhone的景观而不是iPad的景观,所以我进入了info.plist并试图删除最后两个但是当我将构建提交到iTunes Connect时它说它们需要在那里......所以我不喜欢知道是否有办法禁用iPad的水平模式?我想肖像模式是iPhone和iPad上唯一的东西。
This is the error I get.
这是我得到的错误。
Thanks! Hope someone can help!
谢谢!希望有人可以帮忙!
2 个解决方案
#1
1
Try check Requires full screen
, i think it will opt your app out of multitasking and wont prompt error anymore when compile
尝试检查需要全屏,我认为它会选择你的应用程序多任务处理,并在编译时不再提示错误
#2
0
You can do this using programming using this :
你可以使用这个编程来做到这一点:
First you need to enable orientations in General setting tab.
首先,您需要在常规设置选项卡中启用方向。
And Remove all key from plist.
并从plist中删除所有键。
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask(rawValue: IInterfaceOrientationMask.portrait) // this enable all portrait orientation for all device
}
#1
1
Try check Requires full screen
, i think it will opt your app out of multitasking and wont prompt error anymore when compile
尝试检查需要全屏,我认为它会选择你的应用程序多任务处理,并在编译时不再提示错误
#2
0
You can do this using programming using this :
你可以使用这个编程来做到这一点:
First you need to enable orientations in General setting tab.
首先,您需要在常规设置选项卡中启用方向。
And Remove all key from plist.
并从plist中删除所有键。
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask(rawValue: IInterfaceOrientationMask.portrait) // this enable all portrait orientation for all device
}