I have a bunch of UIViewControllers subclasses (let’s call them MainForm, DetailForm, MoreMinorDetails). Basically the idea is that AppDelegate class instantiates MainForm, user presses some type of button on MainForm and DetailForm comes up. Then on a button on the DetailForm launches MoreMinorDetails. And of course, I should be able to go back down to the MainForm.
Note that there aren’t any UINavigationController objects anywhere in sight.
What is the accepted pattern to move between UIViewControllers in a manner described above?
Or am I going about it in the wrong way?
I’ll be happy with either XCode or MonoTouch based explanation.
You can use a
UINavigationControllerand hide the navigation bar:Then in your button’s action just push the next view controller:
To go back, use
To go to a certain view controller (you have to know exactly when it was pushed onto the navigation controller’s stack):
Or to pop to your root view controller
This way, you will obtain the
UINavigationController‘s functionality and keep all the space in the view.