//解决响应两次的问题
if (gestureRecognizer.state == UIGestureRecognizerStateEnded)
{
return;
}
else if (gestureRecognizer.state == UIGestureRecognizerStateBegan)
{
//处理事件
}
//设置二者共存,在初始化长按手势时候添加这行代码
longPressGestureRecognizer.cancelsTouchesInView = NO;