How do ruler apps stay accurate on all devices?

后端 未结 1 1199
南笙
南笙 2020-12-15 12:23

I\'m really confused as to how iOS Ruler apps currently on the market are compatible with different size devices. An example is shown at the bottom.

After researchin

相关标签:
1条回答
  • 2020-12-15 13:03

    As you have discovered, iOS has no public API for getting the device's PPI.

    These apps probably have a hardcoded list, as you speculated. There are under a hundred hardware device ids (see this list for example), and only a handful of different PPIs:

    • non-retina iPhone, iPod touch, and iPad mini: 163 PPI
    • retina iPhone (except 6+), iPod touch, and iPad mini: 326 PPI
    • iPhone 6+: 401 PPI
    • non-retina iPad: 132 PPI
    • retina iPad: 264 PPI

    I'd guess the makers of these apps don't usually test their apps with every device. And unless you've checked the apps, there's no reason you should believe the apps are more accurate than the PPIs listed above.

    To detect the iOS device type, check the answers to this question.

    0 讨论(0)
提交回复
热议问题