I have an app that uses UIViewControllers for everything pretty much. So far I have been using push segueys when there are either button clicks, or some logic after which I have to show a new screen.
Sometimes it works and sometimes I get strange behavior where the next page loads and gets stuck, and its nav bar area does not load.
I use this code:
BusinessController *businessController = [[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"BusinessController"];
[self presentModalViewController:businessController animated:YES];
I have been reading that I should use the modal seguey possibly, but I am not sure which one is better.
Also, I have been reading that I need to embed my controller in a NavigationConroller if I want to to push, but I am not sure what effects that will have on the rest of my app.
Please help me understand what is the right approach here for me.
Thank you!
For the record….
If you’re creating segues you ought to use them, either by linking them to a control so that they activate automatically or by calling
performSegueWithIdentifier:sender:. (As a general statement, modal controllers are an interruption of program flow while pushed controllers are like a stack you move though back and forth.)