2

I have an application that seems best suited for a navigation controller. There are a few places where navigation splits off and is not completely hierarchical but I think I can remedy that just using a modal view at those points.

I want to know if this is the best way to navigate through multiple views or if there is a better way. I want the user to be able to progress through several steps but be able to go back a step or even return to the beginning at certain points.

Additionally, I want to be able to do this using custom buttons. I want to use the entire screen without any navigation bars, etc. I figured I could push and pop the stack with my own custom buttons but I want to know how to make sure the screen is totally usable by me.

user229044
  • 232,980
  • 40
  • 330
  • 338
gonzobrains
  • 7,856
  • 14
  • 81
  • 132
  • `UINavigationController` seems to offer everything you ask for here, so it sounds correct. – LuckyLuke Jul 06 '11 at 18:30
  • Thanks for all of the answers, everyone. But the one most important issue is how to handle displaying views that are completely linear in nature. As I said previously, I may want to branch in different directions and sometimes even loop back to other views that may or may not already be on the stack. – gonzobrains Jul 07 '11 at 11:16

3 Answers3

0

As far as I know, Navigation controller is the best way to navigate among views, you can go back and forth between views using navigation controller easily, even you can present navigation controller as modal view. You can specify your own custom navigation items in navigation bar. And if you do not want navigation bar, you can hide navigation bar. pushing and popping is the best way to implement navigation among views.

jigneshbrahmkhatri
  • 3,627
  • 2
  • 21
  • 33
0

@gonzobrains

I have been in that situation!

Here's what I'd do:

"Hide the navigation bar" using the setHidden property. At places where you want the navigation bar to be seen, I suggest you use a UIToolbar with custom buttons. (its almost impossible to differentiate)

to go back one step you can popViewController

to go all the way back you can use popToRootViewController (like the top right corner button in the IMDB app)

There is no reason why you should not be able to use a navigation controller without using the navigation bar.

Hope this helps!

Nitin Alabur
  • 5,812
  • 1
  • 34
  • 52
  • Having the toolbar rather defeats the purpose of having more screen space, doesn't it? – FeifanZ Jul 06 '11 at 20:58
  • I meant to add that just in case a particular screen needs to have a toolbar kind of view in it. with pushViewController, popViewController and popToRootViewController, the developer has all that is needed to use the navigationcontroller while hiding the default navigation views. – Nitin Alabur Jul 06 '11 at 21:04
0

Keep the nav controller, but you can hide the nav bar easily enough. It could be a viable solution, but make sure your implementation is solid and clear; otherwise you may be rejected. A possible alternative would be to have pages side by side, as in the weather app…but it's your decision as to which paradigm is best.

FeifanZ
  • 16,250
  • 7
  • 45
  • 84