BenX
2012-07-21 00:16:32 +08:00
- (void)hideViewAnimated:(BOOL)animated {
[self.timer invalidate];
if (animated) {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(hideViewDidStop:finished:context:)];
self.alpha = 0.0;
[UIView commitAnimations];
} else {
self.alpha = 0.0f;
self.hidden = YES;
[self removeFromSuperview];
}
}