1

I wonder if is possible to remove background color on selected Item of a UITabBar

I want to remove gray background of UITabBar button. Is it possible ??

I put selected and normal image on delegate method:

- (void)tabBar:(UITabBar *)theTabBar didSelectItem:(UITabBarItem *)item{
    NSUInteger indexOfTab = [[theTabBar items] indexOfObject:item];
    [item setFinishedSelectedImage:[UIImage imageNamed:
                                   [NSString stringWithFormat:@"%u_btnH.png",indexOfTab]]
       withFinishedUnselectedImage:[UIImage imageNamed:
                                   [NSString stringWithFormat:@"%u_btn.png",indexOfTab]]
                                   ];
    }

My custom TabBarItem image are 0_btn.png for normal and 0_btnH.png for selected/hover image

ikanimo
  • 481
  • 1
  • 4
  • 18

1 Answers1

0

Just set the selectionIndicatorImage to an empty image:
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage alloc]];

pre
  • 3,475
  • 2
  • 28
  • 43