<分区>
我正在尝试使 annotation.image 变圆。但我不知道怎么办。我将如何进行 UIImage 轮次。
//Customize Annotation
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
let annotationIdentifier = "Identifier"
var annotationView: MKAnnotationView! = mapView.dequeueReusableAnnotationView(withIdentifier: annotationIdentifier)
if annotationView != nil {
annotationView.annotation = annotation
} else {
annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: annotationIdentifier)
annotationView.image = profileImage.image
annotationView.canShowCallout = true
annotationView.frame = CGRect(x: 0, y: 0, width: 25, height: 25)
annotationView.autoresizesSubviews = true
annotationView.rightCalloutAccessoryView = UIButton(type: UIButtonType.detailDisclosure) as UIView
}
return annotationView
}