Sami
Sami

Reputation: 21

How to make iPad use the @2x.png high res images in "2x" mode

I've read the documentation and googled until I couldn't google anymore, but still I cannot figure out how to make my iPhone app use the higher resolution images when displayed in "2x" mode on the iPad.

I have Icon.png [email protected] and Icon-72.png and they work fine, but I don't want to have to rename all of my images. Also, the "2x" just seems to scale up pixels so text and IB objects look terrible. Is there a fix for this? Any suggestions would be greatly appreciated!

Note: This is not a universal app. I don't want to make it into a universal app. I just want it to scale up and look pretty on the ipad.

Upvotes: 2

Views: 1604

Answers (3)

quellish
quellish

Reputation: 21244

You can register for the notification _UIClassicApplicationWillChangeZoomNotificationName and scale your graphics appropriately, i.e. by setting the rasterizationScale on the CALayer to the value returned by [[UIScreen mainScreen] scale].

Upvotes: 0

Simon Whitaker
Simon Whitaker

Reputation: 20566

It is possible, at least in Cocos2D apps. Matt Rix does exactly this in his app Trainyard and it looks great on the iPad at 2x! He covers some of the details on his blog: Retinafy your Game.

Upvotes: 4

grahamparks
grahamparks

Reputation: 16296

Apple want you to write native iPad apps, so they deliberately don't support this, and there's no way to make it happen that I'm aware of.

Upvotes: 1

Related Questions