Skip to content

Instantly share code, notes, and snippets.

@pcperini
Created June 18, 2014 16:52
Show Gist options
  • Save pcperini/7e5814b29bf80477d0b4 to your computer and use it in GitHub Desktop.
Save pcperini/7e5814b29bf80477d0b4 to your computer and use it in GitHub Desktop.
WorldPin Map Events
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
{
if ([annotation isKindOfClass: [MKUserLocation class]])
return nil;
MKPinAnnotationView *pinAnnotationView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier: @"pinAnnotation"];
[pinAnnotationView setAnnotation: annotation];
if (!pinAnnotationView)
{
pinAnnotationView = [[MKPinAnnotationView alloc] initWithAnnotation: annotation
reuseIdentifier: @"pinAnnotation"];
}
pinAnnotationView.pinColor = MKPinAnnotationColorPurple;
return pinAnnotationView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment