Professional Documents
Culture Documents
- (void)viewTapped:(UITapGestureRecognizer *)sender { NSLog(@"View tapped!"); } - (void)moveToLeft:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { if (bugDead) return; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationDelay:2.0]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(faceRight:finished:context:)]; bug.center = CGPointMake(75, 200); [UIView commitAnimations]; } - (void)faceRight:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { if (bugDead) return; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationDelay:0.0]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(moveToRight:finished:context:)]; bug.transform = CGAffineTransformMakeRotation(M_PI); [UIView commitAnimations]; }