Get device image scale (e.g. @1x, @2x and @3x) Get device image scale (e.g. @1x, @2x and @3x) ios ios

Get device image scale (e.g. @1x, @2x and @3x)


Use

[UIScreen mainScreen].scale;

this will give you the exact scale as per device.

In Swift 3

UIScreen.main.scale

Cheers.