func mapView(_ mapView: MapViewPlus, imageFor annotation: AnnotationPlus) -> UIImage {
let image: UIImage! = UIImage(named: "basic_annotation_image.png")
let imageView: UIImageView = UIImageView(image: image)
imageView.layer.cornerRadius = imageView.frame.width / 2
imageView.clipsToBounds = true
imageView.layer.borderColor = UIColor.white.cgColor
imageView.layer.borderWidth = 4
// Now i want to convert this imageView to UIImage
return UIImage(named: "basic_annotation_image.png")!
}
I want to convert UIImageView to UIImage. Anyone know that how to do that?[enter image description here]