views:

56

answers:

1

Im working on a small app that displays contact and biography details.

You can see two screenshot here: contactDetails, biogDetails.

At the moment I have an Action button on the right hand side of the NavigationBar that displays an ActionSheet where the user can perform various actions like:

  • "add to favorites"
  • "update data",
  • "Biog Details", etc.

I feel the "Biog Details" is not an action as the others and I would like to display it on a different way.

I was wondering if there is a way to add an extra custom button to the PersonViewController. I dont really want to create a lookalike of the PersonViewController, because i would lose functionality that I can replicate with the public APIs.

The other option could maybe be to have a segmentedController on the center of the NavigationBar that would switch between the two viewsControllers. How could I do that?

Im open to ideas.

Thanks,

A: 

The only way you'll be able to add that extra button is if you use the UIToolBar instead of the UINavigationBar.

If you decide to use the UISegmentedControl you'll also have to use the UIToolBar. You can duplicate the UISegmentedControl on both views but with the appropriately selected segment on either.

Or you could use one "base" view, add the other two as subviews and hide/unhide the appropriate view depending on the segment that is selected. This would however mean that you change the position of the subviews (by adjusting their rect parameters) so that they appear just below the UIToolBar

domino