如果UIViewController没有访问权限,我似乎无法获得最高分UINavigationController.这是我到目前为止:
UIApplication.sharedApplication().keyWindow?.rootViewController?.presentViewController(vc, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
但是,它似乎没有做任何事情.在keyWindow和rootViewController似乎是非零值太多,所以可选的链接不应该是一个问题.
注意: 做这样的事情是个坏主意.它打破了MVC模式.