[UIAlertController supportedInterfaceOrientations] was invoked recursively! Instead of using present

09-11 18:36 字数 335 阅读 200 已编辑

解决办法

扩展 UIAlertController

extension UIAlertController {
    open override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return UIInterfaceOrientationMask.portrait
    }

    open override var shouldAutorotate: Bool {
        return false
    }
}

具体原因 https://stackoverflow.com/questions/31406820/uialertcontrollersupportedinterfaceorientations-was-invoked-recursively

0人点赞>
关注 收藏 改进 举报
0 条评论
排序方式 时间 投票
快来抢占一楼吧
请登录后发表评论