Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) panned:(UIPanGestureRecognizer *) recognizer {
- if (waitForSomething) {
- // cancel or reset the recognizer!
- // because the next event should be UIGestureRecognizerStateBegan and not UIGestureRecognizerStateChanged
- return;
- }
- switch (recognizer.state) {
- case UIGestureRecognizerStateBegan:
- // important initialisation code
- break;
- case UIGestureRecognizerStateChanged:
- // do something
- break;
- }
- }
- if (waitForSomething) {
- recognizer.enabled = NO;
- recognizer.enabled = YES;
- return;
- }
Add Comment
Please, Sign In to add comment