Pixel Doubling

Public Service Announcement for Developers writing iPhone apps that are not Universal; if you use UIImageView to draw your UI elements, and create your art at double size (pixel size, not DPI), it will render at its native resolution on iPad.

This way you can provide an iPhone app that's not specifically compatible with iPad yet doesn't render horribly when pixel doubled on the iPad.

I'm guessing this trick will also position you well for any future iPhone with a higher resolution screen that may or may not be announced next month.

As you can see below, when run at 2x on the iPad, the artwork remains crisp (naturally at the cost of larger file sizes for images).

Update:

Just to clarify, using a 2x image will use 4x the RAM as a normal image; it's up to you to figure out how the performance affects your application. Also, I haven't yet looked into a way of drawing text at the higher resolution (rendering the text to an image and using that is a possibility, but I wouldn't recommend something that clunky).

No comments:

Post a Comment