Question

I'm getting different image sizes in a UIBarButtonItem when I install the same app on the same device through Xcode and through an IPA (iTunes).

enter image description here

As you can see, the image appears to fit in the button when the app is installed from Xcode, but it appears larger when the app is installed from an IPA.

I'm using the following code:

UIBarButtonItem *openLeftMenu = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"MenuIcon.png"] style:UIBarButtonItemStylePlain target:self.viewDeckController action:@selector(toggleLeftView)];
[[self navigationItem] setLeftBarButtonItem:openLeftMenu];

The image "MenuIcon.png" is 30 x 25. There is no other image in the directory with that name. I've noticed this issue on both an iPhone 5 and an iPhone 4, which are both running iOS 6.x.

What is going on here and how can I fix this? How do I know which representation of my app is more accurate? When I submit this app to the app store, when people download it, which will it look like?

Was it helpful?

Solution

Do you include a retina version of the icon (MenuIcon@2x.png). If not, add one. I have a feeling this could be leading to the discrepancy

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top