开发者

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 Icon@2x.png 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.


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.


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.


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].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜