gpt4 book ai didi

swift - 对于 supportedInterfaceOrientations(),Int 不能转换为 UIInterfaceOrientationMak

转载 作者:行者123 更新时间:2023-11-28 07:05:14 27 4
gpt4 key购买 nike

Xcode 7 有另一个问题。我尝试了一些研究但无法提出解决方案。错误是 Int 不可转换为 UIInterfaceOrientationMask。代码如下:

override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
if visibleViewController is KINWebBrowserViewController { return Int(UIInterfaceOrientationMask.All.rawValue) }
return Int(UIInterfaceOrientationMask.Portrait.rawValue)
}

谢谢

最佳答案

swift 3.x

override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return visibleViewController is KINWebBrowserViewController ? .all : .portrait
}

关于swift - 对于 supportedInterfaceOrientations(),Int 不能转换为 UIInterfaceOrientationMak,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30824285/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com