I am trying to make the annotation.image round. But I don't know how. How would i go about making a UIImage round.
//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
}
}