我正在使用handleLongPressGesture-function在MKMap上设置引脚。但是当我长按并移动移动时,我的地图上会出现很多图钉。
我能做些什么来阻止这种情况?
此致敬意
您必须检查状态,例如...
- (void)longPressGestureDetected:(id)sender
{
UILongPressGestureRecognizer* gesture = (UILongPressGestureRecognizer*)sender;
UIGestureRecognizerState state = [gesture state];
if (state == UIGestureRecognizerStateBegan) {
set a pin here.
}
}