Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the uinavigationbar title's position?

I've managed to change the navigationbar height by using my own navigationbar, but the title is still centered. I want it to be at the 72px position from the left.

override func sizeThatFits(size: CGSize) -> CGSize {
   return CGSizeMake(UIScreen.mainScreen().bounds.width, 56)
}

I used this to change the height but I didn't find a way to change the position of all the items. I tried to set the frame but I can't. I can't change the position of the button too.

i wanna look like this

enter image description here

like image 774
David Avatar asked Dec 18 '14 04:12

David


1 Answers

navBar.setTitleVerticalPositionAdjustment(CGFloat(7), forBarMetrics: UIBarMetrics.Default)
like image 96
arbel03 Avatar answered Oct 02 '22 03:10

arbel03