[UIView beginAnimations:@"fadeOut" context:nil];
[UIView setAnimationDuration:5.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationStopped)];
self.alpha = 0.0;
[UIView commitAnimations];animationStopped一开始就被调用了,然后5秒后又被调用一次??
[UIView setAnimationDuration:5.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationStopped)];
self.alpha = 0.0;
[UIView commitAnimations];animationStopped一开始就被调用了,然后5秒后又被调用一次??
[UIView animateWithDuration:0.2
animations:^{view.alpha = 0.0;}
completion:^(BOOL finished){ [view removeFromSuperview]; }];