修改UITabBar中的TintColor和BarTintColor的顏色(對(duì)所有的UITabBar都起作用)
[[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.407 green:0.867 blue:0.319 alpha:1.000]];
[[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:0.859 green:0.204 blue:0.219 alpha:1.000]];
修改UINavigationBar中的TintColor和BarTintColor的顏色(對(duì)所有的UINavigationBar都起作用)
[[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:0.565 green:0.565 blue:1.000 alpha:1.000]];
[[UINavigationBar appearance] setBarTintColor:[UIColor
colorWithRed:0.327 green:1.000 blue:0.293 alpha:1.000]];
修改顏色的另一種方法:
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor redColor]}];