How to adjust space between two UIBarButtonItem in rightBarButtonItems

前端 未结 14 2099
悲&欢浪女
悲&欢浪女 2020-12-08 06:44

I am using the following codes to add two button to self.navigationItem.rightBarButtonItems, and I think in iOS7, the space between two buttons are too wide, is there a way

14条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 07:12

    To accomplish this in code without adding an extra container view, use a UIBarButtonItem with the system item type set to FixedSpace. Then set the width of the fixed space to -10 and place it between the two buttons.

提交回复
热议问题