Using iOS14.0.1, Swift5.3, Xcode12.0.1,
I would like to dynamically change the image of a UITabBarController's tabBarItem
Here is my code:
self.tabBarCtrl?.viewControllers?[2].tabBarItem.image = #imageLiteral(resourceName: "Sign_ready")
self.tabBarCtrl?.viewControllers?[2].tabBarItem.selectedImage = #imageLiteral(resourceName: "Sign_ready")
However, in my App, there are two problems
a) The image does change but is way too large b) The color of the image is wrong
How can I get rid of the two problems ?
Here a screenshot of how it currently looks with the code above: