私はマップアノテーションに特定のPNG画像を使用しようとしています。元の画像は761 x 761で、私のアプリに表示されるサイズ変更された注釈画像はすべてぼやけており、解像度が低く見えます。それがどんなアイデアなのか?画像のサイズを変更すると解像度が低くなります
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
ありがとうございます!