Is there any way I can change the Tab Bar Controller's color to something other than the default black? I know this isn't possible in IB, but perhaps maybe through code?
Asked
Active
Viewed 5,508 times
3 Answers
2
In AppDelegate
self.tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor grayColor];

Vineesh TP
- 7,755
- 12
- 66
- 130
2
In AppDelegate.m in didFinishLaunching... method write(this will change for whole app):
[[UITabBar appearance] setBarTintColor:[UIColor myColor]];
Or you can write in ViewController.m in method viewDidLoad:
[self.tabBarController.tabBar setBarTintColor: [UIColor mycolor]];

Ivan Tkachenko
- 489
- 3
- 10
0
You can do with XIB/Storyboard as well as programmatically For Xib/storyboard select tab bar controller than tab and you can see all the options to change tab bar or tab bar view properties see the attached image Image attached here
For programmatically: for tab bar tint and background
[[UITabBar appearance] setTintColor:panelColor];
[[UITabBar appearance] setBarTintColor:[UIColor lightGrayColor]];

Iraniya Naynesh
- 1,125
- 3
- 14
- 26