iphone开发中怎么判断长按事件

iphone开发中如何判断长按事件?如题,在iphone开发中,如何判断长按事件呢??1.?UILongPressGestureRecognize

iphone开发中如何判断长按事件

?

如题,在iphone开发中,如何判断长按事件呢?

?

1.?UILongPressGestureRecognizer

?

2.在touchBegan里面[self performSelector:@selector(longPressMethod:) withObject:nil afterDelay:longPressTime]
然后在 end 或cancel里做判断,如果时间不够长按的时间调用 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(longPressMethod:) object:nil]取消began里的方法