建立新的ViewController
NewViewController *newViewController = [[NewViewController alloc] init];
获取应用的AppDelegate
AppDelegate *newDelegate = [[UIApplication sharedApplication] delegate];
设置rootViewController
newDelegate.window.rootViewController = newViewController;
[newDelegate.window makeKeyAndVisible];
网友评论