草庐IT

presentViewControllerAnimated

全部标签

iOS - presentViewControllerAnimated 与 window.rootViewController

我有一个在应用程序启动时加载的类MasterViewController。在viewDidLoad()中,它检查用户是否登录,并根据结果显示一个或另一个ViewController。如果您没有登录然后继续登录,应用程序会加载一个新的MasterViewController。我的目标是基本上用一个新实例替换现有的MasterViewController,以便它再次执行viewDidLoad中的检查。我尝试了以下方法,它们都有效://changingtherootviewcontrollerletappDelegate=UIApplication.sharedApplication().d