//导航条统一设置
UIFont *font = [UIFont fontWithName:@"Helvetica" size:18.0];//标题字体大小
NSDictionary *textAttributes = @{NSFontAttributeName : font,NSForegroundColorAttributeName:[UIColor whiteColor],};
[[UINavigationBar appearance] setTitleTextAttributes:textAttributes];
//导航条颜色
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setBarTintColor:navigationColor];
//导航条按钮设置
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:14], NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal];
网友评论