Search code examples
iosretina-display

iOS - Retina display assets not working?


I'm running my app on an iPhone 4, and the navigation bar and all my labels are very blurry (Non-retina). Most blurry ui elements are iOS default UIs.

When I run other applications on my phone they look a lot nicer, and you can easily see the difference.

Is there any project setting that I need to change in order to get higher quality Assets to be used in my app?

EDIT:

I don't care about my own assets, What I care about right now is the DEFAULT UI ELEMENTS IN IOS

EDIT:

I have added a shadow to my main UINavigationController, In order to improve performance while animating the shadows, i set ShouldRasterize to YES, removing this line of xode fixes the problem

[self.navigationController.view.layer setShouldRasterize:YES];

Solution

  • If you set Should Rasterize you have to remember to set your rasterization scale.

    [self.view.layer setShouldRasterize:YES];
    [self.view.layer setRasterizationScale:[UIScreen mainScreen].scale];
    

    You have to remember that rasterizing converts the layer to a simple bitmap thats stored in memory to save cpu cycles during complex animations. However if you're on a Retina device you need to make sure you save it at double the scale since the screen has 4 times the pixels.