I have an UINavigationBar added to my UIViewController view. I want to change the fonts properties. Note that I want to change a UINavigationBar not controller. In my app wh
link below will help you. It depends on where would you like to set font properties on current viewController's navigation bar all anywhere in application
you can find nice tutorial here% http://www.appcoda.com/customize-navigation-status-bar-ios-7/?utm_campaign=iOS_Dev_Weekly_Issue_118&utm_medium=email&utm_source=iOS%2BDev%2BWeekly
The basic idea is to create NSDictionary instance and fill it with your desired font and other properties. I finished with this solution:
in your -viewDidLoad controller method after [super viewDidLoad] put this lines:
UIColor *color = [UIColor redColor];
NSShadow *shadow = [NSShadow new];
UIFont *font = [UIFont fontWithName:@"EnterYourFontName" size:20.0]
shadow.shadowColor = [UIColor greenColor];
shadow.shadowBlurRadius = 2;
shadow.shadowOffset = CGSizeMake(1.0f, 1.0f);
//fill this dictionary with text attributes
NSMutableDictionary *topBarTextAttributes = [NSMutableDictionary new];
//ios 7
topBarTextAttributes[NSForegroundColorAttributeName] = color;
//ios 6
topBarTextAttributes[UITextAttributeTextColor] = color;
//ios 6
topBarTextAttributes[UITextAttributeTextShadowOffset] = [NSValue valueWithCGSize:shadow.shadowOffset];
topBarTextAttributes[UITextAttributeTextShadowColor] = shadow.shadowColor;
//ios 7
topBarTextAttributes[NSShadowAttributeName] = shadow;
//ios 6
topBarTextAttributes[UITextAttributeFont] = font;
//ios 7
topBarTextAttributes[NSFontAttributeName] = font;
//for all the controllers uncomment this line
// [[UINavigationBar appearance]setTitleTextAttributes:topBarTextAttributes];
//for current controller uncoment this line
// self.navigationController.navigationBar.titleTextAttributes = topBarTextAttributes;