+(CGFloat)pixelToPoints:(CGFloat)px { CGFloat pointsPerInch = 72.0; // see: http://en.wikipedia.org/wiki/Point%5Fsize#Current%5FDTP%5Fpoint%5Fsystem CGFloat scale = 1; // We dont't use [[UIScreen mainScreen] scale] as we don't want the native pixel, we want pixels for UIFont - it does the retina scaling for us float pixelPerInch; // aka dpi if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { pixelPerInch = 132 * scale; } else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { pixelPerInch = 163 * scale; } else { pixelPerInch = 160 * scale; } CGFloat result = px * pointsPerInch / pixelPerInch; return result; }