你们所有人我一直在研究 Map 视图,但我无法解决捏和点击检测问题 . 我想检测捏并点击 Map 视图 .
我试过在iPhone MapView中使用以下代码
UITapGestureRecognizer * Tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(checktap)]; [self.mapView addGestureRecognizer:Tap]; [点击发布];
UIPinchGestureRecognizer * pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(checkpinch)]; [self.mapView addGestureRecognizer:pinch]; [捏释];
水龙头工作但夹点检测不起作用 .
请帮我 .
提前致谢 .
1 回答
在您的视图中添加以下代码确实加载并在您的.h文件中添加Gesture识别器委托 .
请享用...:)