0

When creating my application for iOS I don't know why but all of my images are blurry and poor quality. They look perfect in photoshop and in preview within Xcode, however when in simulator and testing on my actual device (iPhone 5) they look poor and blurry. They are high res images and I have made them to iPhone image size of 640 x 1136 pixels. I have also added both standard images and @2x. 'This is what they look like in preview: iphone 5 image in preview

And this is what it looks like in simulator (and on my device). Sorry the top is cut off as I am on my Macbook Air and not iMac.

Image on simulator

I am loading my image by the following code:

        CGRect screenBounds = [[UIScreen mainScreen] bounds];
    if (screenBounds.size.height == 568) {
        CCSprite* background = [CCSprite spriteWithFile:@"background_light_iphone5.png"];
        background.position = ccp(160, 284);
        [self addChild:background];
    } else {
        CCSprite* background = [CCSprite spriteWithFile:@"background_light.png"];
        background.position = ccp(160, 240);
        [self addChild:background];
    }

Any help is appreciated. Thanks for your time.

Kevin Tarr
  • 387
  • 3
  • 9
  • if you have a picture just for iphone5, of course you do not need the non-retina version. I'll explain: in the code you have written the name of the image for iphone5 without 2x, and that's ok. but in your bundle you should have this version only with the 2x. in your case should not have an image: background_light_iphone5.png but only: background_light_iphone5@2x.png – Ilario Dec 30 '13 at 15:10
  • Thanks for your suggestion. I've completely got rid of the one without @2x but the images are still blurry and not the same quality. Thanks – Kevin Tarr Dec 30 '13 at 16:11

0 Answers0