views:

205

answers:

3

How would one implement a wizard style interface for the iPhone?

For instance I have a form that I would like to break down into 5 different pages or views instead of putting all the information to fill out into one page or view.

This interface must have the ability to go prev or next in case they want to change something on page 2 when they are on page 4.

This interface must have the ability to go to page 3 directly and still be able to go prev and next. Seems like using UINavigationController wouldn't work here since views 1 and 2 are not on the stack so prev would not work.

Update: Check out the "gas cubby" application. It has what I'm looking for. UITableView presents the items you can fill out. Selecting a row takes you to the detail view to enter data and prev and next to fill in other information.

+3  A: 

UINavigationController seems like the obvious solution. It gives you nice, familiar page transitions for free, and if you need to jump to a specific page you can just set up your navigation stack without using the transition animations.

Darren
UINavigationController would probably work but I would like to show the first view with animation. For instance, if they go to view 3 directly, an animation would be nice.
Joo Park
You can animate the transitions any view. See popToViewController:animated: and setViewControllers:animated:.
Darren
the "gas cubby" app has exactly what I'm looking for. When you enter a new entry, it will show a tableview of the items you can fill out and then a wizard like navigation to enter in the details. Question still stands, how is that best implemented?
Joo Park
here is how i implemented this scenario. http://github.com/joop23/UIViewController
Joo Park
+1  A: 

I would say use a Navigation Controller. On the 1st view, show the 5 options in a Table View. The user selects a row, and then the corresponding section is pushed onto the stack as a new UIViewController. So, if they are in view #3 and want to go back to view #1 (to be honest, I would recommend rethinking whether or not somebody in the real world will actually want to do this), they hit "back" and then select view #1 from the table.

I can't think of a better way to do this because you won't have room to do something like breadcrumbing, which Apple would recommend against anyway. You could use a tab bar but that is more like options then some sort of wizard workflow.

bpapa
going to view number 3 directly versus view 1 would happen if view 1 and 2 are not required to enter but the user wants to enter information on view 3. If the user decides to enter view 3 first out of preference and then the other views. I would like to avoid having the user go back to the main table view to navigate to another detail view.
Joo Park
Why even give them the preference to fill out #3 first though? Like, "I don't want to fill out my name first, but I am super excited to go and enter my ADDRESS!" Doesn't happen. Just 80/20 principle the thing and make things simpler for everybody. If certain fields aren't required, tell them they can skip on each form view.
bpapa
the "gas cubby" app has exactly what I'm looking for. When you enter a new entry, it will show a tableview of the items you can fill out and then a wizard like navigation to enter in the details. Question still stands, how is that best implemented?
Joo Park
+1  A: 

If you really want them to be able to skip around the process, the combination of a UINavigation controller with a UISegmentedControl to jump to sections would do what you want. You can either embed the segmented control in the nav bar or place it just below the nav bar (which seems more like what you want since you have five sections).

If the Segmented control is not quite to your taste just put up any set of five buttons to change sections and make them visually appealing.

Kendall Helmstetter Gelner