开发者

Testing iOS app in devices with non-retina display and with retina display

开发者 https://www.devze.com 2023-04-05 15:13 出处:网络
I am developing开发者_StackOverflow社区 an app that support iOS 4.0 or above. As iOs 4.0 can be installed in iPhone 3GS, iPhone 4, iPod touch 3rd gen, iPod touch 4th gen. The app will be run in non re

I am developing开发者_StackOverflow社区 an app that support iOS 4.0 or above. As iOs 4.0 can be installed in iPhone 3GS, iPhone 4, iPod touch 3rd gen, iPod touch 4th gen. The app will be run in non retina display device and retina display device.

I understand that the OS will determine which image file to display (2x resolution or normal resolution) depends on the devices. If I only have retina display device for testing, can I just use the simulator to test that the UI look good in non retina display?


  1. Just want to make sure you know this: To support retina and non retina you need to have two versions of the same image. For example if the non retina version is named image.png and is of dimensions 100x200, the retina version should be the same image named image@2x.png and of dimensions 200x400. If the retina version is not available the OS scales up the non retina version.

  2. Your simulator has an option to run at the iPhone's normal or retina resolution. Once your iPhone Simulator is booted up, in the top menu bar, select Hardware>>Device. In that menu you can switch between iPad, iPhone and iPhone (Retina). This way you can test your app on retina and non retina resolutions without having those actual devices.


There's no true replacement for device testing, but yes, if it looks alright in the simulator, it generally will look alright on a real device.

0

精彩评论

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

关注公众号