nitz19arg
nitz19arg

Reputation: 427

How to detect circular tap with UITouch?

How to detect a circular tap with UITouch in iOS?

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {    
  // what goes here?
}

Upvotes: 1

Views: 224

Answers (1)

Daniel
Daniel

Reputation: 23359

I believe what you are looking for is some kind of way to detect a circular movement. I suggest you look into UIGestureRecognizer. If so then perhaps this can help you, it's a UIGestureRecognizer subclass for this purpose.

I used this in an application where I wanted to add the ability to turn a round switch around, a bit like a volume control on a Hi-Fi system. Check it out.

https://bitbucket.org/danielphillips/dpcirculargesturerecognizer

Upvotes: 2

Related Questions