4

I have changed the tabBar.selectedImageTintColor to my own purlple color however when the tabbar item is selected there is a bright blue line that surrounds the outside of the image which is now purple..

This looks fairly bad, so now I am trying to find a way to either remove it or change it to a better matching color.

However I don't know how to do it and am hoping someone can tell me.

This is the blue line I am talking about

enter image description here

This is how I changed the image selection color to purpule...

 myTabBar.selectedImageTintColor = [UIColor colorWithRed:49.0/255.0 green:0.0/255.0 blue:98.0/255.0 alpha:0.95];

another example of the blue outline with tabbaricon scaled up

enter image description here

HurkNburkS
  • 5,492
  • 19
  • 100
  • 183

1 Answers1

1

In iOS 5, there are appearance methods that you can set.

Create your unselected and selected images exactly as you want them to appear and then setFinishedSelectedImage: withFinishedUnselectedImage: iOS will not apply any formatting to the images you provide through this method.

UIImage *selectedImage = [UIImage imageWithName:@"my_finished_selected_image"];
UIImage *unselectedImage = [UIImage imageWithName:@"my_finished_unselected_image"];
[tabBarItem setFinishedSelectedImage:selectedImage withFinishedUnselectedImage:unselectedImage];
Irfan
  • 4,301
  • 6
  • 29
  • 46
Jon
  • 462
  • 4
  • 13