0

I'm trying to extend the height of my navigation bar but whenever I change the height, the title and items moves along with it.

Using setTitleVerticalPositionAdjustment I can make the title stay in place but that only works for the title. How can I make the rightBarButtonItem stay in place like the title?

I've also tried to change the frame of the customView of the UIBarButtonitem but that didn't work either.

Perhaps I could subclass the navigation bar and add some auto layout to the title label, left and right bar button items?

Henny Lee
  • 2,970
  • 3
  • 20
  • 37
  • Did you consider adding custom subview below navigation bar? – Alexander Doloz Apr 25 '16 at 16:30
  • Yes, that's what I originally had. But because because of some strange reason, there's a small area beneath the navigation bar making the touches not being registered by the custom view. – Henny Lee Apr 25 '16 at 17:07
  • Yes, I remember your other question. But in this question you added custom view to navigation bar itself. I meant add it to your view controller's view. – Alexander Doloz Apr 25 '16 at 17:11
  • That would work, but then it doesn't look like my navigation bar is extended. The border of the navigation bar then would be visible. – Henny Lee Apr 25 '16 at 17:16
  • You can remove border. http://stackoverflow.com/questions/19226965/how-to-hide-ios7-uinavigationbar-1px-bottom-line – Alexander Doloz Apr 25 '16 at 17:17
  • You're right. Gotta try if I can fix this by doing what you've suggested. Thanks! – Henny Lee Apr 25 '16 at 17:22
  • The problem about not being able to tap the custom subview still remains even adding it to the view of the view controller though. – Henny Lee Apr 25 '16 at 17:39

0 Answers0