I am writing an Objective-C program for the iPhone.
I am trying to implement a UILongPressGestureRecognizer and cannot make it behave the way I want.
What I want to do is simply:
Respond to the touch that is held on the screen.
UILongPressGestureRecognizer works great every time I touch it and when I touch it, but if I keep the touch in the same place, nothing happens.
Why?
How can I handle the touch without moving and stay in the same place?
Here is my current code.
// Configure the press and hold gesture recognizer touchAndHoldRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(touchAndHold:)]; touchAndHoldRecognizer.minimumPressDuration = 0.1; touchAndHoldRecognizer.allowableMovement = 600; [self.view addGestureRecognizer:touchAndHoldRecognizer];
J-rock
source share