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

解决办法

扩展 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