0

I am trying to change the highlighted color of the tabBarItem just like the Viber app does. I don't want to change the color of all the Bar, just the highlighted color.

I have read a lot posts here, but none of them explained how to do only this modification.

Does someone know how to do this? There is many apps that have customized colors!

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
Roberto Ferraz
  • 2,511
  • 24
  • 43

2 Answers2

0

Currently, with iOS4, this type of customization is not possible with a standard UITabBar. Most applications that have customized UITabBars actually create their own. Check out CocoaControls for some drop in third-party solutions you could use.

Christopher A
  • 2,961
  • 1
  • 22
  • 23
0

Have you tried:

UIView *bg = [[[UIView alloc] initWithFrame:CGRectMake(0,0,320,49)] autorelease];
[bg setBackgroundColor:[UIColor redColor]];
[self.tabBarController.tabBar insertSubview:bg atIndex:1];

That code initially creates a background view for the tabBar and sets it's colour to red.

max_
  • 24,076
  • 39
  • 122
  • 211
  • Thanks for your reply.. but this code turns the tabbar all red.. I just want to change the highlighted color. – Roberto Ferraz Sep 30 '11 at 23:59
  • Oh right, look at this then `http://stackoverflow.com/questions/3461867/is-there-a-way-to-use-a-custom-selected-image-for-uitabbaritem` – max_ Oct 01 '11 at 16:24