oe a
oe a

Reputation: 2280

Tab bar icons pixelated and cut off

I am trying to set my UITabbar icons via interface builder. Here is what I am seeing:

enter image description here

Two problems here:

  1. Why is the bottom cut off? The dimensions of these 3 images in order is 64x42, 44x44, 46x46.
  2. Why are they pixelated/blurry?

I am following the guidelines for tab bar icons listed here:
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

I am not using the image, image@2x naming scheme. I am just setting these in IB. This app will be only released to devices with retina displays in any case. The screenshot is from an iPhone 5.

Upvotes: 2

Views: 3000

Answers (1)

atomkirk
atomkirk

Reputation: 3801

The only indication UIKit uses to determine if an image is retina is if it has the @2x scheme. Otherwise, UIKit will treat it as a non-retina image. This is why it is showing the image double the size it should be, because you have not used the naming scheme to tell UIKit that the image should be rendered 4 pixels per screen point.

Upvotes: 10

Related Questions