UIGraphicsBeginImageContext must be Retina-aware? UIGraphicsBeginImageContext must be Retina-aware? ios ios

UIGraphicsBeginImageContext must be Retina-aware?


You can create the image context like this:

 UIGraphicsBeginImageContextWithOptions(size, false, UIScreen.main.scale)


You can get the scale value of your device by the following method

[[UIScreen mainScreen] scale]

With this information you can decide how many points you would like to draw.