gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:18:00 25 4
gpt4 key购买 nike

这个让我很困惑。

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 (USING SIMULATOR) 返回 6 plus 的正确尺寸:

deviceWidth 414.0
deviceHeight 736.0
viewWidth 414.0
viewHeight 736.0

iphone 6 plus (REAL DEAL) 返回常规 ole 6 的正确尺寸:

deviceWidth 375.0
deviceHeight 667.0
viewWidth 375.0
viewHeight 667.0

这怎么可能?

最佳答案

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

引用 Apple 开发者论坛的帖子:

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com