I am working on an iPhone app that has a tab bar. I made the tab bar icons using a vector graphics editor and exported them to PNG. The icons look fine, except when selected.


This doesn’t happen on the retina display.
I use self.tabBarItem.image = [UIImage imageNamed:@"Symbol"]; to set the image.
Here is the actual PNG: https://i.stack.imgur.com/ChxHk.png (though it happens with all the images).
What can I do about this? Why does this happen?
This appears to happen when the images don’t have a margin. If you add a margin of 2px it will look fine: