Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neiraza/8912978 to your computer and use it in GitHub Desktop.
Save neiraza/8912978 to your computer and use it in GitHub Desktop.
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
// MKAnnotationViewを拡張した独自Annotation
if ([view.annotation isMemberOfClass:[HogeAnnotationEx class]]) {
MapPin *pin = (HogeAnnotationEx *)view.annotation;
// 独自Annotationにタイプとか定義しとく
if (pin.type == hoge) {
LOG(@"user");
} else if (pin.type == fuga) {
LOG(@"hoot");
} else if (pin.type == foo) {
LOG(@"bot");
} else {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment