Allow tapping anywhere on an annotation callout without a callout accessory view

前端 未结 5 1560
情歌与酒
情歌与酒 2020-12-28 16:35

I have a map view that adds annotations more or less like this:

- (MKAnnotationView *)mapView:(MKMapView *)mapView
            viewForAnnotation:(id 

        
5条回答
  •  孤独总比滥情好
    2020-12-28 17:24

    If you don't need tap indication, I'd advise to throw a UITapGestureRecognizer into the callout upon creation and add your handling object (perhaps controller) as a target with appropriate action.

提交回复
热议问题