Is this possible? I want the number of inches, not the number of pixels. I know it is approximately 160 ppi. But not exactly.
note: screen rotation matters here
extension UIScreen { var physicalSize:CGSize { return CGSize(width: bounds.width*scale, height: bounds.height*scale) } }
using:
print(UIScreen.main.physicalSize)