1
I set up two images for one tabBarItem
. As I couldn’t find a way to change the center of the image, I used the following method to make the image effect go up a few pixels, above the UITabBar
:
self.navigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(4, 0, -5, 0);
Worked perfectly!
But during use, when the button is clicked several times in a row, the image is stretched.
Normal state:
After a few clicks in a row on the button:
How to correctly adjust the image height, or change the height of the image itself UITabBarItem
, without this problem occurring?