You will need to calculate the PPI (pixels per inch) of the display so that you can convert pixels to inches. However, I did not find a way to get these values programmatically. I think you should hardcode it and determine on which device you should decide which PPI value to use. However, this is not salvation in the future.
, Xcode iOS?.
Retina Display , iPhone4.
Erica Sadun uidevice-extension lib.
wikipedia.org.