Search code examples
iphoneipadios5

add multiple UIBarButtonItems to UINavigationItem in Storyboard?


enter image description here

It is easy to add a single UIBarButton item as you can see here in my Storyboard. But I want to add several and it seems I cannot using the Storyboard?

Which is annoying because then I lose the whole nice overview of the Storyboard and it's Segue's.

Is this the case? First project using Storyboards so I figured I might be missing something.


Solution

  • In XCode 4.6 (at least), you can drag a plain view onto the navigation bar (on whichever side you want multiple buttons), then drag a toolbar on top of that. Once you've done that, you can place multiple bar button items on the toolbar, and wire them up to actions / segues, etc, as normal. Make sure you have the view and toolbar both set up for default (transparent) background color.