【发布时间】:2016-12-23 05:34:51
【问题描述】:
我知道这是重复类型的问题,但我找不到此问题的解决方案。我在 Info.plist 文件中设置了更改以在
下停止旋转横向模式Supported interface orientations (iPad)
只保留肖像的关键值然后我在 iPad 上检查它工作正常但是当我在应用商店上传时它会给出如下错误
ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations:
'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found
'UIInterfaceOrientationPortrait' in bundle 'com.example.demo'."
ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations:
'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'com.example.demo'."
多任务支持需要横向我已经编写了以下代码来覆盖旋转方法,但在屏幕旋转时它不会调用
extension UINavigationController {
public override func supportedInterfaceOrientations() -> Int {
return visibleViewController.supportedInterfaceOrientations()
}
public override func shouldAutorotate() -> Bool {
return visibleViewController.shouldAutorotate()
}
}
并尝试在 navigationController 对象上设置直接值然后它给出错误:
只读属性不能赋值
【问题讨论】:
标签: iphone ipad swift3 ios10 xcode8.2