I have an app with navigation controller, but my app also has a simple separate view which is not a navigation controller part. And what I want to do is to add a brand new navigation controller to this view.
For my first navigation controller I used this code in my AppDelegate:
UINavigationController *navigationController = [[UINavigationController new] initWithRootViewController:viewController1];
navigationController.viewControllers = [NSArray arrayWithObject:viewController1];
self.window.rootViewController = navigationController;
But which code I should use, if I want to create a new Navigation Controller ?
Thanks !
UPDATE:
So, I made some pictures:
One the first pic there is a navigation controller (which is declared in AppDelegate). And It contains an info button. Then, when we press the button we move to another view (pic 2). And its just a navigation bar in this view, not an navigation controller. I wanna add a navigation controller, not a navigation bar in this view, so users will be able to use UITableView easily


We would need to know a little more about your intended view hierarchy, and application flow. But in the code you’re posting, I’m not sure what is going on. Why not just:
That said, you would create other
UINavigationControllers exactly the same way.Update:
When you press the info button on the first view, you could present the navigation controller modally I think.
Note that I’m not dealing with memory management because I don’t know if this is ARC or not. Is that how it should behave?