How to adjust UIToolBar left and right padding

后端 未结 10 554
自闭症患者
自闭症患者 2020-12-02 05:05

I create one UIToolbar with code and another with interface builder. But, found out the two toolbar having different left and right padding which shown below:

From I

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 05:36

    Just add negative constants to your leading and trailing constraints of the UIToolbar. That way, the toolbar starts and ends outside of your view and therefore has less padding.

提交回复
热议问题