Change UINavigationBar font properties?
(This is not possible using the new iOS 5.0 Appearance API).
Edit:
iOS >= 5.0 :
Set the Title Text Attributes for the Navigationbar:
// Customize the title text for *all* UINavigationBars
NSDictionary *settings = @{
UITextAttributeFont : [UIFont fontWithName:@"YOURFONTNAME" size:20.0],
UITextAttributeTextColor : [UIColor whiteColor],
UITextAttributeTextShadowColor : [UIColor clearColor],
UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetZero]};
[[UINavigationBar appearance] setTitleTextAttributes:settings];
iOS < 5.0
UINavigationItem doesn't have a property called label or something, only a titleView. You are only able to set the font by setting a custom label as this title view You could use the following code: (as suggested here)
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 44)];
label.font = [UIFont fontWithName:@"YOURFONTNAME" size:20.0];
label.shadowColor = [UIColor clearColor];
label.textColor =[UIColor whiteColor];
label.text = self.title;
self.navigationItem.titleView = label;
[label release];
From iOS 5 onwards we have to set title text color and font of navigation bar using titleTextAttribute Dictionary(predefined dictionary in UInavigation controller class reference).
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], NSForegroundColorAttributeName,
[UIFont fontWithName:@"ArialMT" size:16.0], NSFontAttributeName,nil]];
The below tutorial is the best tutorial for customization of UIElements like UInavigation bar, UIsegmented control, UITabBar. This may be helpful to you
http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5