长安 手势 是没有这个 withEvent:(UIEvent*) event 参数的,而 按钮 可以带这个参数
UILongPressGestureRecognizer *longGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(actionLongGesture:withEvent:)];
[self addGestureRecognizer:longGesture];
[longGesture release];
-(void) actionLongGesture:(UILongPressGestureRecognizer*)longPressGestureRecognizer withEvent:(UIEvent*) event
{
if (longPressGestureRecognizer.state == UIGestureRecognizerStateEnded)
{
if (delegate != nil && [delegate respondsToSelector:@selector(longPressAction:point:)]) {
CGPoint point = [longPressGestureRecognizer locationInView:self];
[delegate longPressAction:self point:point];
}
}
}