Ever wondered how to place more than one button into a navigation bar in your app? I know it doesn’t look neat at all! The class UIBarButtonItem allows us to initialize a new instance with a custom view. This instance can be used as a kind of a toolbar and you can put as much buttons as you like in there. The toolbar again can be used for the rigthtBarButtonItem or leftBarButtonItem. Please remember:

  • Keep your interface clean and simple and
  • Be consistent with the iPhone Human Interface Guideline

For those guys, who still demand on more than one button on the left or right side of a navigation bar, the following code snippet could be useful.

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注