Answer the question
In order to leave comments, you need to log in
What is the correct way to implement an application using UINavigationController?
For some time now I have been tormented by the question of how to "humanly" make an application with multiple screens. Everywhere they say that you need to use UINavigationController, okay, I can pull the necessary component into IB, attach the ViewController I need to it, but as soon as it comes to the second / third / fourth windows, I don’t understand how to implement the transition between them, and even and binding. The first window associated with the UINavigationController automatically gets the navigation bar, which is good. But in order for subsequent windows to receive it, you need to link them using IB (for example, by pressing the Push button) to another window. And if I want to manually create the desired controller in the button click event and add it to the self.navigationController stack? If I just initialize it, then the transition fires,
Actually, please: outline a simple verbal algorithm for creating two windows, between which you can safely move, but with the manual creation of the desired controller. Something like "Pull the controller on the storyboard, specify its ID and create it in the function using this method." Thanks in advance to everyone.
Answer the question
In order to leave comments, you need to log in
Don't forget to put the correct identifier in IB
AccountEditVC *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AccountEditVC"];
[vc editAccount:tmpAcc];
vc.delegate = self;
[self.navigationController pushViewController:vc animated:YES];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question