ios - iPhone 6 plus 尺寸显示为 375.0 x 667.0?

标签 ios iphone screen-size

这个让我很困惑。

println("screenWidth \(UIScreen.mainScreen().bounds.size.width)")
println("screenHeight \(UIScreen.mainScreen().bounds.size.height)")
println("viewWidth \(self.view.bounds.size.width)")
println("viewHeight \(self.view.bounds.size.height)")

iphone 6 plus (使用模拟器)返回 6 plus 的正确尺寸:

deviceWidth 414.0
deviceHeight 736.0
viewWidth 414.0
viewHeight 736.0

iPhone 6 plus (真正的优惠) 返回常规 ole 6 的正确尺寸:

deviceWidth 375.0
deviceHeight 667.0
viewWidth 375.0
viewHeight 667.0

这怎么可能?

最佳答案

您的设备在“设置”->“显示和亮度”下将“显示缩放”设置为“缩放”。

引用苹果开发者论坛的帖子:

If the phone is set for zoomed mode, you get either the iPhone 5S screen size (on iPhone 6) or the iPhone 6 size (on iPhone 6 Plus). Keep in mind that on iPhone 6 Plus in zoomed mode you still get a 3x screen, and thus your 3x assets are used.

关于ios - iPhone 6 plus 尺寸显示为 375.0 x 667.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28281154/

相关文章:

php - 从带有 PHP 的 ios 到 mySQL

iphone - 应用程序包保护 - 签名包*可能*被修改

iphone - 在 Objective-C 中将 unsigned char * 转换为 int *

android - Adb shell getevent 方法返回 Nexus 4 上 X 和 Y 值的两倍

ios - iOS 6 Siri API 在哪里

ios - 未找到框架 GoogleMapsCore

ios - 下载mp3文件,保存到磁盘,然后以URL读取

iphone - 是否有可能在结束减速之前知道最终的 UIScrollView contentOffset?

android - 运行 "adb shell wm density 240"更改 Android 设备密度时出错

android - Phonegap 获取工作区的屏幕高度(屏幕减去状态栏)