I cannot set font for Navigation Bar
in my NavigationController
using story board. I checked some questions here. They told options to change the font available in Attributes Inspector
. But when I checked there I can't select custom fonts for my NavigationBar
. You can see that in below screen shot.
You can see the Font Family field is disabled. So please help me to change the Navigation Bar
font from story board. Thanks in advance.
You can add custom font with code if you want that font in all project just add it to didFinishLaunchingWithOptions
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], NSForegroundColorAttributeName,
[UIFont fontWithName:@"fontname" size:24.0], NSFontAttributeName, nil]];
Just change Custom to System and change again to Custom. Im not sure why, but this worked for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With