Reputation: 16204
I am trying to assign a 60x60 px image to the tabBarItem.image
:
self.tabBarItem.image = [UIImage imageNamed:@"[email protected]"];
I have read in HIG, that I should put 60x60 px image for the Retina display. But what I get is an incorrectly sized image:
If I make it 30x30px ,it looks bad too (not like for Retina).
Upvotes: 1
Views: 1069
Reputation: 31045
You don't need to specify that the @2x.png
image is used. For your project, just add these two images in Xcode:
[email protected] (60x60 pixels)
tab_settings.png (30x30 pixels)
And then in your code use this:
self.tabBarItem.image = [UIImage imageNamed:@"tab_settings"];
iOS will determine whether to use the 30x30, or 60x60 image for you. It's a really nice design by Apple.
Upvotes: 5