0

How can i fill iOS TabBar icon with different color when selected and deselected or can i have different image for each of the state? enter image description here

EDIT: I want the border effect where some will have border and transparent background while some will be filled

Shags mando
  • 105
  • 1
  • 2
  • 6
  • It's your problem. The system shows the provided image or images only. You should create an image or images for both states respectively. For example: *exampleSelected.png* and *exampleUnselected.png*. They are should be different. – Mannopson Oct 20 '17 at 12:41
  • How can i show different images for the selected and unselected state @Mannopson – Shags mando Oct 20 '17 at 15:28

1 Answers1

0

You can set UITabBar icon's colour when it is selected:

[[UITabBar appearance] setTintColor:<YOUR-COLOR>];
Aneeq Anwar
  • 1,282
  • 7
  • 20
  • Yes but that will change the color of the image and the i want the border effect where some will have border and transparent background while some will be filled – Shags mando Oct 20 '17 at 11:02