Niv
Niv

Reputation: 2312

Force UITabBarItem's image to a specific size


I have a UITabBarController, initialized by a xib file. all it's view controllers are initialized by a xib file as well. In apple's HIG it is specified that a High-resolution tab bar icon should be approximately 60x60. I have a set of 52x52 icons, and I used them as the image for the tab items. but for some reason, it displays them as if I'm using a none-high resolution screen - they're off the bounds of the tab bar item, and are pixelized.

How can i set a "fixed" size for the icons so this will be avoided, and how can I, using Interface builder, choose different tab bar images for low-resolution and high-resolution screens?

Tnx in advance!

Upvotes: 0

Views: 1698

Answers (1)

Daniel
Daniel

Reputation: 23359

What names are you using for these images?

What you usually have to do is have the standard image named xxxx.png and the high resolution retina display image named [email protected]

When you use these images in interface builder, use the standard image, the system will look for that filename with "@2x" if it's being executed on an iPhone 4.

Upvotes: 1

Related Questions