Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

x12

macrumors newbie
Original poster
May 20, 2009
27
0
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

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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.