4

I've created a tabbar application,I am using a custom TabBar with a backGround image. I have finished all the parts but unable to remove the glow of tabbar button on click(i just changing the UIButton selection on click,but glow is still there)

How to hide the glow of UITabBar Buttons(ie hiding the selection tint of buttons) ?

Now TabBar is like this..

Need tabBar like this

Nithin M Keloth
  • 1,595
  • 1
  • 20
  • 37

5 Answers5

9

You can use the following code.

[[UITabBar appearance] setSelectionIndicatorImage:[[UIImage alloc] init]];

Try It.

manujmv
  • 6,450
  • 1
  • 22
  • 35
2

To change tabbar tint colour

[[UITabBar appearance] setSelectedImageTintColor:[UIColor grayColor]];

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
mano
  • 184
  • 1
  • 8
  • no..i meant the selection glow, i want to remove that effect when i click simple words : nothing should happen on tabbar appearance when i click an effect user should not find which button is been clicked (actually i will change button selected image for that) – Nithin M Keloth Nov 28 '12 at 06:52
  • do u need to change tab bar image when customer select some tab right? – mano Nov 28 '12 at 06:58
  • no..u still did not get the real need of mine, "on a tabbar application(any simple one) when user click on one tab,that tab button will be selected(a gray colored tint will be there right ?) I want to hide that..!!!" – Nithin M Keloth Nov 28 '12 at 07:01
  • only way to achieve this u need to replace the whole tabbar instead of replace tabbaritem – mano Nov 28 '12 at 07:30
2

This will definitely help you. Simply create an UIImage object and pass it to setSelectionIndicatorImage property .

[yourTabbar setSelectionIndicatorImage:[[UIImage alloc] init]];
Sourabh Bhardwaj
  • 2,524
  • 1
  • 17
  • 19
1
[self.tabBarController.tabBar insertSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"1.png"]] autorelease] atIndex:1];
Brad Larson
  • 170,088
  • 45
  • 397
  • 571
mano
  • 184
  • 1
  • 8
0

You need to set UITabBarItem appearance:

[[UITabBarItem appearance] setTitleTextAttributes:
 [NSDictionary dictionaryWithObjectsAndKeys:[UIColor yellowColor], UITextAttributeTextColor,
                                          [UIFont systemFontOfSize:14.0f], UITextAttributeFont,nil]
                                         forState:UIControlStateHighlighted];
sunkehappy
  • 8,970
  • 5
  • 44
  • 65
  • no..i meant the selection glow, i want to remove that effect when i click simple words : nothing should happen on tabbar appearance when i click an effect user should not find which button is been clicked (actually i will change button selected image for that) – Nithin M Keloth Nov 28 '12 at 06:50