开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜