title: iOS : Why can't I get mapkit to display a custom annotation pin image?
body: <p>figured that using my own custom pin image for annotations would be super easy.</p>
  
  <p>But I have never been able to get it to work, and I have no idea why!</p>
  
  <p>I am simply using:</p>
  
  <pre><code>- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id&lt;MKAnnotation&gt;)annotation
  {
      if([annotation isKindOfClass:[MKUserLocation class]])
          return nil;
  
      NSString *annotationIdentifier = @"CustomViewAnnotation";
      CustomAnnotationView * customAnnotationView = (CustomAnnotationView *) [self.mapview dequeueReusableAnnotationViewWithIdentifier:annotationIdentifier];
      if(!customAnnotationView)
      {
          customAnnotationView=[[CustomAnnotationView alloc] initWithAnnotationWithImage:annotation
                                                                         reuseIdentifier:annotationIdentifier 
                                                                     annotationViewImage:[UIImage imageNamed:@"map_location_pin.png"]];
      }
  
      customAnnotationView.image=[UIImage imageNamed:@"map_location_pin.png"];
  
      customAnnotationView.canShowCallout= YES;
  
      return customAnnotationView;
  }
  </code></pre>
  
  <p>I assumed that this should work, as a UIImage is what it is wanting, and I do have the .png file in my project.</p>
  
  <p>It never uses my image, but just the standard red pin. What am I doing wrong here?</p>