I do this:
[[UINavigationBar appearance] setTitleTextAttributes:@{UITextAttributeTextColor: navTextColor,UITextAttributeTextShadowColor: navTextColor,UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, 0)],UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue-Bold" size:12],UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue-Bold" size:12]}];
The result is the text is smaller. However, it's posted too high.
I can fix that using
[[UINavigationBar appearance] setTitleVerticalPositionAdjustment:5 forBarMetrics:UIBarMetricsDefault];
But sometimes I want to use UIText rather than just pics on the titleView and that get pushed down too.
It would be a very strange design I think to have text goes up like that. So what's the catch and how do I make title texts in UINavigationBar centered vertically as it is horizontally.
One solution is Check this answer.
Other solution is set the frame
of your label view
. check this answer