title: MKPinAnnotationView versus MKAnnotationView
body: <p>I've inherited a project which throws this warning</p>
  
  <pre><code>Incompatible pointer types assigning to 'MKPinAnnotationView *' from 'MKAnnotationView *'
  </code></pre>
  
  <p>at this line</p>
  
  <pre><code>pinView=[[[MKAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:defaultPinID]autorelease];
      }
  </code></pre>
  
  <p>I'd like to return the project without warnings so I'm hoping someone here has a quick answer</p>
  
  <p>Full code:</p>
  
  <pre><code>-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation: (id  &lt;MKAnnotation&gt;)annotation {
      MKPinAnnotationView *pinView = nil; 
  
      NSUserDefaults *prefs=[NSUserDefaults standardUserDefaults];
  
      if(annotation != mapView.userLocation) 
  
      {
  
          static NSString *defaultPinID = @"com.invasivecode.pin";
  
          pinView = (MKPinAnnotationView *)[mapView  dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
  
  
          if (!pinView) {
              pinView=[[[MKAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:defaultPinID]autorelease];
          }
  
      }   
      pinView.animatesDrop=YES;
      [mapView.userLocation setTitle:@"I am here"];
      [mapView.userLocation setSubtitle:[prefs objectForKey:@"CurrentLocationName"]];
      return pinView;        
  }
  </code></pre>
  
  <p>Thanks!</p>