「lastPoint」という名前のメンバー変数を設定して、最後に移動したときのポイントを記録できます。
次回は方向を計算できます
CGPoint lastPoint;
- (void) touchedBegin:(NSSet *)touches withEvent:(UIEvent *)event {
lastPoint = [touch locationInView:self.view];
}
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
NSSet *allTouches = [event allTouches];
//you can save the point , then used in next time you want
int tInput = [allTouches count]-1;
UITouch *touch =[[allTouches allObjects] objectAtIndex:tInput];
CGPoint location = [touch locationInView:self.view];
float theAngle = atan2( location.y-imageX.center.y, location.x-imageX.center.x );
float theLastAngle = atan2( lastPoint.y-imageX.center.y, lastPoint.x-imageX.center.x );
lastPoint = location;
// compare theAngle & theLastAngle , so you can know it is clockwise or counterclockwise.
}