A thorough search of SO is drawing up blanks for this issue.
All the previous answers recommend using setSelectedImageTintColor
which has since been deprecated.
How can you change the color of your UITabBar Button Icon's/Item's when selected?
NSArray *itemArray = self.tabBar.items;
UITabBarItem *item0 = [itemArray firstObject];
item0.image = [[UIImage imageNamed:@"tap_home_button"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
item0.selectedImage = [[UIImage imageNamed:@"tap_home_button_hightlighed"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.