iPhone 6.1 simulator screen resolution is 320x548 instead of 640x1136, why does it heppend?

馋奶兔 提交于 2019-12-13 01:51:46

问题


I create an application for iPhone using PhoneGAP. I create design of application for 640x1136 resolution. But when I tried to run application into iPhone 6.1 simulator the resolution was 320x548 instead of 640x1136. I check the simulation screen resolution using following JavaScript code.

$("#width").text(window.innerWidth); $("#height").text(window.innerHeight);

To accomplish this, I tried the following steps

  1. Edit your Info.plist file in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/Resources/Devices/iPhone (Retina).deviceinfo/

  2. Open the .plist file in XCode and add the following key/value pairs,

eagle : 640 giraffe:1136

  1. Save the file and restart your simulator.

  2. Select iPhone (Retina) to see the new resolution.

But it doesn't help.

Could you please help me.

Thanks in advance Sorry for my bad english


回答1:


When you run on the simulator you still need to select the "hardware" that you are running on. When running the simulator choose Hardware -> Device and select the correct device (with Retina or not) to test with.



来源:https://stackoverflow.com/questions/15454847/iphone-6-1-simulator-screen-resolution-is-320x548-instead-of-640x1136-why-does

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!