iOS: Positioning navigation bar buttons within custom navigation bar

前端 未结 3 1141
庸人自扰
庸人自扰 2020-12-17 20:22

I\'m building an app with a custom navigation bar. After some research I decided to do this using a category on UINavigationBar. The navigation bar needs to be a bit larger

3条回答
  •  无人及你
    2020-12-17 21:14

    My solution, not the best, but it works for me fine. My custom navigation bar has height 55 (default height is 44). I cut from my custom navigation bar only 44 of height and insert it to the navigation bar. Then I cut next part of my custom navigation bar (shadows etc.) and insert it as image view under the navigation bar. And that's it. Buttons are at right places...

提交回复
热议问题