快速改变UINavigationController和UITabBarController相关属相的方法

修改UITabBar中的TintColor和BarTintColor的颜色(对所有的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的颜色(对所有的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]}];

你可能感兴趣的:(快速改变UINavigationController和UITabBarController相关属相的方法)