如何在iPhone Simulator中加入640×1136分辨率?

傳說(shuō)中的iPhone 5將會(huì)采用4寸屏幕,其分辨率將會(huì)達(dá)到640×1136,這一推斷已經(jīng)在iOS 6 Beta中的配置文件中得到了證實(shí),現(xiàn)在,如果各位設(shè)計(jì)師和開(kāi)發(fā)者如果對(duì)此感興趣,可以在iOS模擬器中先體驗(yàn)一把,當(dāng)然,餡餅不是從天上掉下來(lái)的,干貨需要自備:

首先,新建一個(gè)文件,名為“File.txt”,將以下內(nèi)容粘入文件:

<?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”> <plist version=”1.0″> <dict> <key>E</key> <string>Well, this was fun to discover. But don’t change this magic value!</string> <key>EagleEnabled</key> <true/> <key>GiraffeEnabled</key> <true/> </dict> </plist>

其次,打開(kāi)iPhone Simulator中的Info.plist文件,它的位置是:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/Resources/Devices/iPhone (Retina).deviceinfo/Info.plist

最后,在此文件最后一行下加入以下文本:

<key>eagle</key>
<string>640</string>
<key>giraffe</key>
<string>1136</string>

重啟模擬器,選擇Retina模式,看效果!

注意:此操作需要安裝Xcode 4.4.1和iPhone 5.1 Simulator環(huán)境

評(píng)論