Swift2 iOS9 - how to get custom image instead of default annotation red pin in my code
<p>Here is my code. I have tried all the solutions available but I am not able to put image I wish to instead of the default annotation red pin in my code. </p>

<pre><code>import MapKit

class ViewController: UIViewController, MKMapViewDelegate {

@IBOutlet var map: MKMapView!

override func viewDidLoad() {
    super.viewDidLoad()

    var location = CLLocationCoordinate2DMake(18.956449, 72.810597)

    var span = MKCoordinateSpanMake(0.009, 0.009)
    var region = MKCoordinateRegion(center: location, span: span)

    map.setRegion(region, animated: true)

    var annotation = MKPointAnnotation()
    annotation.coordinate = location
    annotation.title = "Wilson College"
    annotation.subtitle = "Commerce College"

    map.addAnnotation(annotation)
    print("showing on map")

    mapView(map, viewForAnnotation: annotation)


}



func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -&gt; MKAnnotationView? {

    let identifier = "MyPin"
    print("inside viewForAnnotation")
    if annotation.isKindOfClass(MKUserLocation) {
        return nil
    }

    let detailButton: UIButton = UIButton(type: UIButtonType.DetailDisclosure)

    // Reuse the annotation if possible
    var annotationView = mapView.dequeueReusableAnnotationViewWithIdentifier(identifier)

    if annotationView == nil
    {
        annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "pin")
        annotationView!.canShowCallout = true
        annotationView!.image = UIImage(named: "VRtest.png")
        annotationView!.rightCalloutAccessoryView = detailButton
        print("editing annotation")
    }
    else
    {
        annotationView!.annotation = annotation
    }

    return annotationView
}
</code></pre>

<p><a href="https://i.stack.imgur.com/eBjzE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eBjzE.png" alt="enter image description here"></a></p>

<p>Any help is appreciated. thank you</p>