简体   繁体   中英

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM