Navigation bar with multiple buttons

后端 未结 3 1730
北荒
北荒 2020-12-15 05:00

I have a navigation bar with a left and right button, and I need to put another button next to the right button. Does anyone know how I can go about this? Here is some code

3条回答
  •  春和景丽
    2020-12-15 05:48

    Instead of using self.navigationItem.rightBarButtonItem, use

    self.navigationItem.rightBarButtonItems //note the plural
    

    This allows you to set an array of buttons rather than a single one.

    See the UINavigationItem class reference for details.

提交回复
热议问题