ytpm
ytpm

Reputation: 5160

Blurry images when running my application on iPhone

So, I was creating an application for iOS with Xcode 4.2.1, I don't know why all of my icons are blurry, they are in high definition, but for some reason they looks blurry and in a bad quality.

even the background images looks bad..

Please help me, what can I do about it?

This is the original button image:

image

This is how it looks on the application:

blurry

Upvotes: 2

Views: 3636

Answers (3)

Emil
Emil

Reputation: 7256

Make sure you saved the high-resolution images with the ending @2x.png, if they aren't they won't work. Also remember that the images needs to be twice the size of the pixles on the screen, that means a 50px x 50px-button will need a 100px x 100px-@2x-file.

Read more about retina icons in the iOS Documentation here.

Upvotes: 8

SVGreg
SVGreg

Reputation: 2368

You should round the origin of each image. If you place image with coordinate like (250.34, 340.21) you get blurry effect. This is very likely to happen when you use automatic position calculation as well as center property to place your views/images.

Upvotes: 2

matt
matt

Reputation: 536009

In the simulator, use the new Debug menu to check whether your images are misaligned. If they are, use NSRectIntegral to fix their frames.

Upvotes: 1

Related Questions