Possible Duplicate:
Detect Retina Display
How can we know if a device has a retina display or not from objective C code?
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]
&& [[UIScreen mainScreen] scale] >= 2.0) {
// Retina
} else {
// Not Retina
}
You can check the scale
property on [UIScreen mainScreen]
if it is 2.0 you are running on retina, if it is 1.0 you are not. You can also get the scale from the current CoreGraphics Context.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With