4

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?

glglgl
  • 81,640
  • 11
  • 130
  • 202
Subramanian P
  • 4,188
  • 1
  • 17
  • 25

3 Answers3

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
  • 6,693
  • 3
  • 32
  • 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
  • 19,954
  • 11
  • 54
  • 69
2
tabBar.tintColor = [UIColor redColor];
Saad
  • 8,501
  • 2
  • 36
  • 49