More than 1 rightBarButtonItem on navigation bar

前端 未结 9 992
清歌不尽
清歌不尽 2021-01-30 02:06

I would like to have two rightBarButtonItems on navigation bar. One for Edit and the other for Add.

Obviously I can\'t make it using Interface Builder.

Does anyb

9条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 02:39

    if someone is passing by, here is the swift answer :

    let barButton_array: [UIBarButtonItem] = [Button1, Button2]
    navigationItem.setRightBarButtonItems(barButton_array, animated: false)
    

提交回复
热议问题