i have a uiimageview rotating when another is touched using a timer to rotate 360d, the first image touched will disappear and image3 will appear i dont know how to make it stop rotating when image3 is touched can anyone help
this is the code for image2 touch to start the rotation i have nothing in the image3 touch yet as i dont know where to start with it i have been searching online for a good while now for this can anyone help
Code:
UITouch *touch = [touches anyObject];
if ([touch view] == image2){
radians = -360 * M_PI / 180;
[image2 removeFromSuperview];
[self.view addSubview:image3];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1];
[UIView setAnimationRepeatCount:1e100f];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
timer = [ NSTimer scheduledTimerWithTimeInterval: 0.03 target: self selector: @selector(rotation:) userInfo: nil repeats: YES ];
[UIView commitAnimations];
}
this is the code for image2 touch to start the rotation i have nothing in the image3 touch yet as i dont know where to start with it i have been searching online for a good while now for this can anyone help