我刚刚使用 cocos2d 完成了我的 iPhone 游戏。但在将其发布到 AppStore 之前,我想让它在 iPad(屏幕更大)和 iPhone 4(分辨率更大)上运行。
那么,我如何以编程方式确定我的应用程序正在 iPhone、iPad 或 iPhone 4 上运行,以便能够在我的游戏中使用正确的坐标/图像?
感谢您的帮助!
iPad 和 iPhone 之间 — Already https://stackoverflow.com/questions/2884391/api-to-determine-whether-running-on-iphone-or-ipad answered https://stackoverflow.com/questions/2975811/how-can-i-detect-which-system-my-app-store-application-is-running-on many https://stackoverflow.com/questions/2862140/best-way-to-programmatically-detect-ipad-iphone-hardware times https://stackoverflow.com/questions/2159951/is-there-a-specific-xcode-compiler-flag-that-gets-set-when-compiling-for-ipad.
iPhone 和 iPhone 4 之间— 报告的尺寸为still320×480,所以你不需要改变任何坐标。创建一个@2x
如果您需要高分辨率 UI 图像,则可以替代图像。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)