解决iOS开发 百度地图点击协议方法不走的问题

- (void)mapView:(BMKMapView *)mapView onClickedMapBlank:(CLLocationCoordinate2D)coordinate { }

此方法不走 


解决方法为(手势冲突)


- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {

    if ([touch.view isKindOfClass:NSClassFromString(@"TapDetectingView")]) {

        return NO;

    }

    return YES;

}


你可能感兴趣的:(iOS,百度地图)