How to add touch gesture to map but ignore touches on pins and annotations?
问题 I have a mapview that uses MKCircle s to display radius information for certain user actions. What I want to do, is allow the user to dismiss the MKCircle when they touch the map. However, I would like the MKCircle to NOT dismiss should the user touch any of the other pins or the MKCircle itself. Any ideas? Here is my current code, which dismisses the MKCircle when any part of the map is touched: UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action: