Normally tab bar selection color is blue in iPhone. Instead of that I want to change the color as brown. How can I change the tabbar selection color? Shall I need to create custom tabbar controller?
Asked
Active
Viewed 6,514 times
4
-
dupe of http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar – rishi May 14 '12 at 10:20
3 Answers
6
In case you want to use an image:
[self.tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"selected_tab.png"]];
In case you want to use a color:
[self.tabBar setSelectedImageTintColor:[UIColor whiteColor]];

Jasper
- 7,031
- 3
- 35
- 43
5
yes if you create customTabBar controller and switch background image of TabBar control then its work like system TabBar...you just create 5 different images and set it with selected tab on your TabBar Delegate method,here if you use graphics image then its also work.....means you use this tabbar globally in your many application :)

Paras Joshi
- 20,427
- 11
- 57
- 70
2
tabBar.tintColor = [UIColor redColor];

Saad
- 8,857
- 2
- 41
- 51
-
Its only changing the tab bar color, but i need to change selection color. – Subramanian P May 14 '12 at 10:45
-
I tried but its only changing the tab bar color, Not changing the selection color – Subramanian P May 14 '12 at 11:05
-
-
-
@Subramanian did you find a solution ? Whatever I find, it changes the color of whole tab bar, I want to have different color for selected tab and different for unselected. – user1324887 Jul 28 '16 at 04:25