Created
June 18, 2014 16:52
-
-
Save pcperini/7e5814b29bf80477d0b4 to your computer and use it in GitHub Desktop.
WorldPin Map Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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