MKAnnotationView and tap detection

前端 未结 6 1280
攒了一身酷
攒了一身酷 2020-12-09 21:29

I have a MKMapView. I added a UITapGestureRecognizer with a single tap.

I now want to add a MKAnnotationView to the map. I can

6条回答
  •  离开以前
    2020-12-09 21:56

    I'm not sure why you would have a UITapGestureRecognizer on your map view, saying this in plain text is obviously implying it will mess around with some multitouch functionality of your map.

    I would suggest you take a look and play around with the cancelsTouchesInView property of UIGestureRecognizer (see documentation). I think this could solve your problem. Make sure you check out the documentation.

提交回复
热议问题