Reputation: 4973
So I'm building an app for 4.x devices and I'm wondering if I can just use one set of assets at double resolution instead of one set with a @2x id and another set without.
Basically im asking can the older 3g and 3gs just use the @2x assets? and do the right thing with them?
anyone have experience with this?
Thanks
Upvotes: 2
Views: 432
Reputation: 635
You're better off using two sets of resources, one for the high resolution retina displays and one for the older displays. Downsizing @2x graphics won't look pretty and will impact performance, especially on 2G iPod Touches.
The older devices can use the @2x but as far as I understand you'll need to:
Overall, it's better to provide two copies of the images, "bob.png" and "[email protected]" then reference them in code as "bob.png".
NB. As of iOS4 you can reference the images without their file endings, so just "bob" would work; however this has compatibility implications with devices running pre-iOS4 : the images won't be found. So for maximum compatibility include the file endings if you intend on deploying to both iOS4 and iOS3.x.
Upvotes: 2
Reputation: 7255
They technically can, given you make sure they're scaling the right way (e.g. if it's an image view that it's set to scale up/down).
However it's not recommended in most situations, mainly because it'll be slower, uses more resources, and leads to shorter battery life. Also, depends on your resources but an artwork scaled down by a factor of 2 doesn't have the same quality as one that is resampled specifically for the new size.
Upvotes: 1