Monday, February 26, 2024
HomeiOS Developmentios - iOS12.5 UITabBarItem selectedImage not working

ios – iOS12.5 UITabBarItem selectedImage not working


I am having challenge with UITabBarItem’s selectedImage is just not working solely on iOS 12. It ignores the picture’s shade totally, solely present black/gray shade. Different iOS model work advantageous with code beneath. My picture is exported from Figma with inexperienced shade + orange however when choose on tabbar it exhibits solely gray.

Picture is in PNG format, already tried with PDF single scale however consequence nonetheless the identical.

let vc = HomeViewController.storyboardInstance()
let tabBarItem = UITabBarItem(title: "residence".localized(), picture: UIImage(named: "tabbar.residence.chosen"), selectedImage: UIImage(named: "tabbar.residence.chosen"))
tabBarItem.updateFont()
vc.tabBarItem = tabBarItem
return CustomNavigationController(rootViewController: vc)

Does anybody right here know what’s the drawback ?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments