//改变navigationcontroller背景(青色)
[self.navigationController.navigationBar setBackgroundImage:imageforBarMetrics:UIBarMetricsDefault];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithTitle:@"back"style:UIBarButtonItemStyleBorderedtarget:self action:@selector(back:)];
//backButton背景颜色(back按钮背景黄色)
back.tintColor = [UIColor yellowColor];
self.navigationItem.backBarButtonItem = back;
UIBarButtonItem *right = [[UIBarButtonItem alloc]initWithTitle:@"next" style:UIBarButtonItemStyleBordered target: self action:@selector(next:)];
//改变right背景颜色(next按钮背景绿色)
right.tintColor = [UIColor greenColor];
self.navigationItem.rightBarButtonItem = right;
// NSArray *fontsArr = [UIFont familyNames];//打印所有字体
//navigation标题(棕色brownColor)(字典依次为标题(餐饮,种类)字体颜色,阴影颜色,阴影范围,字体,字体大小)
[self.navigationController.navigationBarsetTitleTextAttributes:[NSDictionarydictionaryWithObjectsAndKeys:[UIColorbrownColor],UITextAttributeTextColor, [UIColorcolorWithRed:0 green:0 blue:0alpha:0.8],UITextAttributeTextShadowColor,[NSValuevalueWithUIOffset:UIOffsetMake(0.5, 0.5)],UITextAttributeTextShadowOffset,[UIFontfontWithName:@"Times New Roman"size:24.0f],UITextAttributeFont, nil]];
//定制应用中所有导航栏有barButttonItem按钮 appearance(字典依次为标题(next,back)字体颜色,阴影颜色,阴影范围,字体,字体大小)
[[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionarydictionaryWithObjectsAndKeys:
[UIColor redColor ],UITextAttributeTextColor,[UIColorcolorWithRed:0 green:0 blue:0alpha:0.8],UITextAttributeTextShadowColor,[NSValuevalueWithUIOffset:UIOffsetMake(1.5, 1.5)],UITextAttributeTextShadowOffset,[UIFontfontWithName:@"Times New Roman"size:20],UITextAttributeFont, nil]forState:UIControlStateNormal ];
有图有真相:(为了显示阴影效果偏移量UIOffsetMake(1.5, 1.5)比较,自己调小即可,红色为按钮标题颜色,黑色(alpha:0.8)为阴影)