高德地图添加点击手势不响应

使用场景,我们公司需要做一个类似房多多点击地图 -- 查看周边配套的效果,测试后高德好像屏蔽了该手势,所以实现下面代理方法去实现

UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapDidClick)];
tap.delegate = self;
[self.mapView addGestureRecognizer:tap];
//ios开发中,默认是在同一时间只能有一个手势被执行,要实现多个手势同时进行,须实现
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}

- (void)tapDidClick
{
    NSLog(@"tapDidClick");
}

你可能感兴趣的:(高德地图添加点击手势不响应)