Embedding a navigation controller in a container - Goal C

How to embed a navigation controller in a container? When I put the container, the first one that shows is the viewController nesting in the container, I want to change this viewController to a navigation view and set its rootViewController and other views

0
source share
3 answers

Basically, just add the ViewController to the UINavigationController and set the UINavigationController as your rootViewController. Hope this helps:

ViewController *vc = [[ViewController alloc] init];
UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
self.window.rootViewController = nvc;
0
source

, , : * , , * , , * - > In- > . * .

+1

UINavigationController UIViewController. , "" - NavigationController, .

, UITabbarController. , rootViewControler. .

:

enter image description here

homeTabbar.

if (Boolean conditions) {//show login page
    [self showLoginAndRegisterVC];
} else { //show home Page
    [self showHomeViewController];
}
[self.window makeKeyAndVisible];
0

All Articles