I\'m using UILongPressGestureRecognizer class to handle if one item is being selected.
The logic is as follows: User press during 1 second an item (UIView subclass).
Does the custom UIView class have its own touch handling code? If not, a simple solution is to set the allowableMovement
property of the UILongPressGestureRecognizer
to CGFLOAT_MAX
, or some big number, and use the gesture update callbacks to drag your custom view around. You can get the displacement using the - (CGPoint)locationInView:(UIView *)view
method on the superview, and compare its position to when the recognizer began.