How would I detect a long tap (tap and hold) within a UIScrollView?
+5
A:
In view's touchesBegan:
you can call your "long tap" handle with some delay.
[touchHandler performSelector:@selector(longTap:) withObject:nil afterDelay:1.5];
Then in view's touchesEnded:
you can cancel that call if not enough time has passed:
[NSObject cancelPreviousPerformRequestsWithTarget:touchHandler selector:@selector(longTap:) object:nil];
Vladimir
2010-04-06 14:32:55
thanksssssssss! you saved my life! (+1)
Digital Robot
2010-04-17 15:11:07