I am using a custom tab bar image and the middle tab is also a custom image (much like an older version of Instagram).
Here is some of my code:
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UITabBar *tabBar = tabBarController.tabBar;
[tabBar setBackgroundImage:[UIImage imageNamed:@"CustomTabBar.png"]];
UITabBarItem *tabBarItem3 = [tabBar.items objectAtIndex:2];
tabBarItem3.title = nil;
tabBarItem3.image = nil;
[tabBarItem3 setFinishedSelectedImage:[UIImage imageNamed:@"tab-button-selected.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"tab-button.png"]];
This works great, but I have one issue I cannot fix. The selected tab has, by default, a light grey background. This is an effect which I would like to keep, but not for the middle tab. The middle tab is a larger round image which does change when it is selected, but still the grey background appears.
Is there a way to remove this like [tabBar setSelectionIndicatorImage:[[UIImage alloc] init]];
but for that tab only. Or, in the app delegate, detect a change in tab and remove it there?