Is there a way to detect if the rotation done by the user is in clockwise or counter clockwise direct???
I searched for that but couldn’t find an answer !
My code looks like this:
UIGestureRecognizer *recognizer;
recognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(spin)];
[self.rotating addGestureRecognizer:recognizer];
[recognizer release];
the
rotationproperty will tell you the rotation in radians. A negative value would indicate the rotation is clockwise, and a positive value indicates counter-clockwise.Example: