CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

JPSpamGestureRecognizer 0.1

JPSpamGestureRecognizer 0.1

TestsTested
LangLanguage Obj-CObjective C
License Custom
ReleasedLast Release Dec 2014

Maintained by Justin Poliachik.



  • By
  • Justin Poliachik

Don't let users spam your app with taps!

UIGestureRecognizer subclass that watches for repeated taps within 1 second.

Usage

Add the gesture recognizer to any UIView

JPSpamGestureRecognizer *spamGesture = [[JPSpamGestureRecognizer alloc] initWithTarget:self action:@selector(onSpam)];
spamGesture.numberOfTapsPerSecondRequired = 4;
spamGesture.recognizedBlock = ^{
     // alternate gesture recognizer block
};

[self.view addGestureRecognizer:spamGesture];