0
votes

I'm trying to figure out how to call an action after the UIGestureRecognizer has detected the gesture, when it "loses focus" (the user lifts their finger off the screen). So basically, if a user swipes their finger up for example, then lifts their finger off the screen, how can I detect that the finger was lifted?

1

1 Answers

0
votes

You can use the "state" property to detect the time when user ends up with swiping.

- (void)handleSwipeGesture:(UISwipeGestureRecognizer *)recognizer
{
    if (recognizer.state == UIGestureRecognizerStateEnded)
    {
     //do something
    }
}