我知道这是重复类型的问题,但我找不到这个问题的解决方案。我在 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 对象上设置直接值,然后它会给出错误:
只读属性不能赋值