So I am trying to use a specific PNG image for my map annotation. The original image is 761 x 761 and the resized annotation image that shows up in my app is all blurry and low-resolution-looking. Any idea why that is?
chargerAnnotationImage = UIImage(named: "ChargerGreen")!
let size = CGSize(width: 25, height: 25)
UIGraphicsBeginImageContext(size)
chargerAnnotationImage.drawInRect(CGRectMake(0, 0, size.width, size.height))
let resizedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return resizedImage
Thank you!
Aucun commentaire:
Enregistrer un commentaire