开发者

How can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4?

开发者 https://www.devze.com 2023-01-03 01:09 出处:网络
I just finish my iPhone game using cocos2d. But before I put it on the AppStore, I\'d like to make it work on iPad (which have a bigger screen) and iPhone 4 (which have a bigger resolution).

I just finish my iPhone game using cocos2d. But before I put it on the AppStore, I'd like to make it work on iPad (which have a bigger screen) and iPhone 4 (which have a bigger resolution).

So, how can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4, to be开发者_如何转开发 able to use the correct coordinates / images in my game?

Thanks for your help!


Between iPad and iPhone — Already answered many times.

Between iPhone and iPhone 4 — The size reported is still 320×480, so you don't need to change anything about the coordinates. Create an @2x alternative for the images if you need a high resolution UI image.

0

精彩评论

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