工作生活

scale和nativeScale

2019-07-02  本文已影响0人  ShenYj

scale

This value reflects the scale factor needed to convert from the default logical coordinate space into the device coordinate space of this screen. The default logical coordinate space is measured using points. For Retina displays, the scale factor may be 3.0 or 2.0 and one point can represented by nine or four pixels, respectively. For standard-resolution displays, the scale factor is 1.0 and one point equals one pixel.

nativeScale

The native scale factor for the physical screen.

iPhone 8 Plus 标准模式

[Line 34] scale:3.000000
[Line 35] nativeScale:2.608696

iPhone 8 Plus 放大模式

[Line 34] scale:3.000000
[Line 35] nativeScale:2.880000

更多信息可以参考Stack OverFlow

上一篇 下一篇

猜你喜欢

热点阅读