Home > Web Front-end > HTML Tutorial > How to implement root controller jump in UIWindow without using proxy (implementation of page jump)_html/css_WEB-ITnose

How to implement root controller jump in UIWindow without using proxy (implementation of page jump)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:07
Original
961 people have browsed it

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)

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template