2

I am making a clock that can be controlled by the user.I have a UIImagview with a name minhandview(minute hand needle of the clock). I want to rotate it under my finger(it should track the finger movement) with a constant rotation of 5 degrees when the user keep on rotating it.I am using the following code for it

- (void) touchesMoved:(NSSet *)_touches withEvent:(UIEvent *)_event

{

UITouch *touch=[[_event allTouches]anyObject];
CGPoint pt = [touch locationInView:self.view];

if([touch view]==minhandview)
{

    minhandview.transform = CGAffineTransformRotate(minhandview.transform, Degrees2Radians(5));
}

}

the image is rotating fine 5 degrees everytime this method is called but it is not following my finger(rotating to fast) how can I correct it? Please help. thanks

hariszaman
  • 8,202
  • 2
  • 40
  • 59

0 Answers0