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

Darkroom

Guest
Original poster
this works fine in OS 3, but it doesn't call fade out in OS2.2? what is the problem?

Code:
- (void)animationHasFinished:(NSString *)animationID finished:(BOOL)finished context:(void *)context;
	{
	if ((animationID == @"FadeIn") && finished)
		{
		[self fadeOut];
		}
	}
	
- (void)fadeIn
	{
	[UIView beginAnimations:@"FadeIn" context:NULL];
	[UIView setAnimationDelegate:self];
	[UIView setAnimationDidStopSelector:@selector(animationHasFinished:finished:context:)];
	[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
	[UIView setAnimationDuration:0.05];
	[self.myView setAlpha:1.0];
	[UIView commitAnimations];
	}
	
- (void)fadeOut
	{
	[UIView beginAnimations:@"FadeOut" context:NULL];
	[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
	[UIView setAnimationDuration:0.45];
	[self.myView setAlpha:0.0];
	[UIView commitAnimations];
	}

[EDIT] solved. 2.2.1 requires "- (void)animationDidStop🙁NSString *)animationID finished🙁NSNumber *)finished context🙁void *)context;"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.