How to get the devices scale factor?
Swift 3+ version:
UIScreen.main.scale
The device's scale factor is a property of UIScreen
. You can obtain it by:
[UIScreen mainScreen].scale;
Documentation here.
Swift 3+ version:
UIScreen.main.scale
The device's scale factor is a property of UIScreen
. You can obtain it by:
[UIScreen mainScreen].scale;
Documentation here.