title: MapKit not showing custom Annotation pin image on iOS9
body: <p>My code worked fine from iOS 7 to 8. With the update yesterday the custom images on my pins were replaced by the standard pin image.
  Any suggestions?</p>
  
  <p>My code:</p>
  
  <pre><code>extension ViewController: MKMapViewDelegate {
  
      func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -&gt; MKAnnotationView! {
  
          if annotation is MKUserLocation {
              return nil
          }
  
          let reuseId = String(stringInterpolationSegment: annotation.coordinate.longitude)
  
          var pinView = mapView.dequeueReusableAnnotationViewWithIdentifier(reuseId) as? MKPinAnnotationView
  
          if pinView == nil {
  
              pinView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: reuseId)
              pinView!.canShowCallout = true
              pinView!.image = getRightImage(annotation.title!!) 
          }
  
          let button = UIButton(type: UIButtonType.DetailDisclosure) 
          pinView?.rightCalloutAccessoryView = button
  
          return pinView
      }
  }
  </code></pre>
  
  <p>The function to get the image returns a <code>UIImage</code> based on the name:</p>
  
  <pre><code>func getRightImage (shopName:String)-&gt; UIImage{
  
      var correctImage = UIImage()
  
      switch shopName
      {
      case "Kaisers":
          correctImage = UIImage(named: "Kaisers.jpg")!
      default:
          correctImage = UIImage(named: "sopiconsmall.png")!
  
      }
  
      return correctImage
  }
  </code></pre>
  
  <p>No the map looks like this:
  <a href="https://i.stack.imgur.com/GJPmW.jpg"><img src="https://i.stack.imgur.com/GJPmW.jpg" alt="ios9 without images"></a></p>