title: Shows different Pin images in MKMapview
body: <p>In my MKMap view I have customized the annotation pin with an image. But still some pins are static and not showing the given image.</p>
  
  <p>I am using   <strong>-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation</strong> to set the pin image. </p>
  
  <p>Adding my code and screen here: </p>
  
  <pre><code>-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;)annotation
   {
  
  
  if ([annotation isKindOfClass:[MKUserLocation class]])
      return nil;
  
  static NSString* AnnotationIdentifier = @"AnnotationIdentifier";
  MKPinAnnotationView* pinView = [[MKPinAnnotationView alloc]
                                   initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier];
  pinView.animatesDrop=YES;
  pinView.canShowCallout=YES;
      pinView.pinColor= MKPinAnnotationColorGreen;
  
      pinView.enabled = YES;
      pinView.canShowCallout = YES;
      pinView.image=[UIImage imageNamed:@"bublerest.png"]; //here I am giving the image  
  
  
  
  
  
  UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
  [rightButton setTitle:annotation.title forState:UIControlStateNormal];
  [rightButton addTarget:self
                  action:@selector(showDetails:)
        forControlEvents:UIControlEventTouchUpInside];
  
      pinView.rightCalloutAccessoryView = rightButton;
  
  UIImageView *profileIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"rest_image2.png"]];
  pinView.leftCalloutAccessoryView = profileIconView;
  
  
  return pinView;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/31K0Y.png" alt="enter image description here"></p>
  
  <p>Any ideas?</p>