Ios iPhone XR UIScreen.main.com报告375 x 812

Ios iPhone XR UIScreen.main.com报告375 x 812,ios,swift,xcode,iphone-xr,Ios,Swift,Xcode,Iphone Xr,Xcode 10.1Swift 4.2 我的蓝色iPhone XR用于为UIScreen.main.bounds let screenSize = UIScreen.main.bounds print(screenSize) // (0.0, 0.0, 414.0, 896.0) 现在它发布了375.0812.0,与iPhoneX的尺寸相同 let screenSize = UIScreen.main.bounds print(screenSize) // (0.0, 0.0, 375.0,

Xcode 10.1Swift 4.2

我的蓝色iPhone XR用于为
UIScreen.main.bounds

let screenSize = UIScreen.main.bounds
print(screenSize)
// (0.0, 0.0, 414.0, 896.0)
现在它发布了375.0812.0,与iPhoneX的尺寸相同

let screenSize = UIScreen.main.bounds
print(screenSize)
// (0.0, 0.0, 375.0, 812.0)

这不会发生在模拟器(XR)中,只会发生在设备上。我已更新到最新的iOS 12.1.1并清除了生成文件夹。有人知道可能发生了什么,或者我的手机有故障吗?

您的手机的屏幕放大了

设置>显示

当您将该值设置为标准时,您将看到预期值


您正在使用启动映像吗?如果是这样,请确保为所有需要的屏幕大小提供启动图像,或者使用启动屏幕文件(情节提要)。我使用的是
LaunchScreen.storyboard
。这不仅仅是一个图像。不过我会看看这个,因为它可能是某种原因。