Home > Article > Web Front-end > How to implement root controller jump in UIWindow without using proxy (implementation of page jump)_html/css_WEB-ITnose
1. Jump to the page individually
#pragma mark - changeViewController controller jump
- (void)changeViewController{
LoginPageController * login = [[LoginPageController alloc]init];
UIWindow * window = [UIApplication sharedApplication].keyWindow;
window.rootViewController = login;
}
@end
2. The jumped pages include navigation bar (UINavigationController) and UITabBarController
#pragma mark - viewController jump
- (void)changeViewController{
DetailPageController * detailPage = [[DetailPageController alloc]init];
UINavigationController * nv = [[UINavigationController alloc] initWithRootViewController: detailPage];
UITabBarController * tab = [[UITabBarController alloc]init];
tab.viewControllers = @[nv];// Add the navigation bar to the tabbar controller
UIWindow * window = [UIApplication sharedApplication].keyWindow;
window.rootViewController = tab;
}
UIWindow does not use a proxy. How to implement the root controller jump (implementation of page jump) UIWindow does not use a proxy. How to implement the root controller jump (implementation of page jump) UIWindow does not use a proxy. How to implement the jump of the root controller (implementation of page jump) UIWindow without using a proxy How to implement the jump of the root controller (implementation of page jump)