I have a multiple View Controllers and i want to set the font color of all to red.
[[UINavigationBar appearance] setFont:[UIFont boldSystemFontOfSize:12.0]];
is throwing an unrecognized selector error.
please give a code, to help fix the following.
I did this by adding just few lines of code in AppDelegate.m class didFinishLaunchingWithOptions method: Use this code:
it works for me...
Use this line of code
I think this will be helpful for you.
For deployment targets greater than or equal to iOS 6, you should use
NSShadow
instead:Doing this on iOS 8+ and in Swift. There isn't a
setTitleTextAttributes
for the appearance object. Instead, do this:If you need to do this in Swift, you can create an extension for the UINavigationBar to allow you to get or set these settings.
You can then set the color and font like this:
This could be used to set a custom view to a single navigationBar instead of a global setting