Reputation: 33140
To indicate distance I draw a circle on top of MKMapview.
The problem is that circle get in the way of MKMapview. When that circle is around I can't easily zoom in or zoom out MKMapview.
How can I tell that cirlce to just pass all touch events to the parent namely MKMapview.
Upvotes: 0
Views: 93
Reputation: 2200
if your circle is an instance of UIView you can simple disable user interaction on it:
circle.userInteractionEnabled = NO;
that way the circle won't receive any touch events and the mapView will handle them.
Upvotes: 1
Reputation: 3477
Take a look at UIView
method:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
From -hitTest:withEvent:
documentation:
"If pointInside:withEvent: returns YES, then the subview’s hierarchy is traversed; otherwise, its branch of the view hierarchy is ignored."
Upvotes: 1