title: Custom pin on MKMapView in iOS?
body: <p>I have tried just about everything to get an image displayed instead of the default red pin on my MKMapView.</p>
  
  <p><strong>There are a lot of answers about this on the internet but all of them keep giving me this:</strong></p>
  
  <hr>
  
  <pre><code>- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id&lt;MKAnnotation&gt;)annotation
  {
      if([annotation isKindOfClass:[MKUserLocation class]])
          return nil;
  
      NSString *annotationIdentifier = @"CustomViewAnnotation";
      MKAnnotationView* annotationView = [mapview dequeueReusableAnnotationViewWithIdentifier:annotationIdentifier];
      if(!annotationView)
      {
          annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation
                                                        reuseIdentifier:annotationIdentifier]];
      }
      annotationView.image = [UIImage imageNamed:@"map_location_pin.png"];
      annotationView.canShowCallout= YES;
  
      return annotationView;
  }
  </code></pre>
  
  <hr>
  
  <p>This doesn't help me at all, its just a method by the looks of it.</p>
  
  <p>Please tell me how to use this to make the method return a annotation with a custom image.
  Just about all the other answers tell me to implement that method with no further explaination.</p>
  
  <p><strong>Where do I call it? How do I call it?</strong></p>
  
  <p>Thanks!</p>