0

Is possible to add an MKOverlay when the user taps an MKAnnotation? I.e., what I want to achieve is when the user taps the annotation pin, I want to draw a polygon (a circle for example), and when the user taps again the overlay should hide.

amb
  • 4,798
  • 6
  • 41
  • 68

1 Answers1

0

If annotation was tapped call function with adding overlay. Use this in your code:

[self.mapView addOverlay:self.circle];

for controll if annotation was tapped already, i would use BOOL variable in your interface:

@interface ClassName() {
    BOOL annotationWasTapped;
}
@end
edzio27
  • 4,126
  • 7
  • 33
  • 48