How to hide an image after one second
I want to hide an image after one second, as开发者_StackOverflow a flip animation ends. Please someone help me.
Assuming that you need to hide after loading from viewDidLoad, Declare following in your viewDidLoad;
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(hideYourImage) userInfo:nil repeats:NO];
-(void)hideYourImage
{
[yourImageView setHidden:TRUE];
}
Here you are. Hope it helps.
If you are doing flip animation using UIView animation, then you can specify code for animation completion.
[UIView animateWithDuration:0.2
animations:^{// Put your flip animation}
completion:^(BOOL finished){ [imageView removeFromSuperview]; }];
Else, the timer method will also do.
精彩评论