为什么在带有Xcode 4.2的iPad 3上[[UIScale mainScreen]缩放] 1? [英] Why is [[UIScale mainScreen] scale] 1 on an iPad 3 with Xcode 4.2?
问题描述
在我的iPad 3上测试时,
When testing on my iPad 3,
[[UIScreen mainScreen] scale] == 1.0
我的理解是这应该是2.0。
My understanding is that this should be 2.0.
我正在使用Snow Leopard上带有Xcode 4.2的iOS 5.1 SDK,我理解这不是官方支持的配置。但是,我无法想象为什么这会影响纯粹在设备上发生的事情。 (我可以想象它会破坏模拟器的各种方法。)
I am using the iOS 5.1 SDK with Xcode 4.2 on Snow Leopard, which I understand is not an "officially supported" configuration. However, I can't imagine why that would affect what is happening purely on the device. (I can imagine all sorts of ways it would break the simulator.)
推荐答案
在XCode版本4.3之前,[UIScreen scale]将返回1.0 for iPad 3.更新到4.3将返回正确的2.0值。
Before XCode version 4.3, [UIScreen scale] will return 1.0 for an iPad 3. Updating to 4.3 will enable the correct value of 2.0 being returned.
这篇关于为什么在带有Xcode 4.2的iPad 3上[[UIScale mainScreen]缩放] 1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!