相关疑难解决方法(0)

获得最顶级的UIViewController

如果UIViewController没有访问权限,我似乎无法获得最高分UINavigationController.这是我到目前为止:

UIApplication.sharedApplication().keyWindow?.rootViewController?.presentViewController(vc, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)

但是,它似乎没有做任何事情.在keyWindowrootViewController似乎是非零值太多,所以可选的链接不应该是一个问题.

注意: 做这样的事情是个坏主意.它打破了MVC模式.

uiviewcontroller swift

174
推荐指数
14
解决办法
12万
查看次数

标签 统计

swift ×1

uiviewcontroller ×1