不同的apple设备dpi不同,根据官网提供的数据
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScreen_Class/Reference/UIScreen.html
scale
The natural scale factor associated with the screen. (read-only)
Discussion
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, where one point is approximately equal to 1/160th of an inch. If a device’s screen has a reasonably similar pixel density, the scale factor is typically set to 1.0 so that one point maps to one pixel. However, a screen with a significantly different pixel density may set this property to a higher value.
Availability
- Available in iOS 4.0 and later.
本文探讨了iOS设备的像素密度(dpi)差异及其对屏幕适配的影响,通过解析苹果官方文档,展示了如何根据设备类型计算dpi,确保应用在不同设备上的兼容性和视觉一致性。

被折叠的 条评论
为什么被折叠?



