xcode 在特定时间段后隐藏图像

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5008338/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:14:26  来源:igfitidea点击:

hide an image in after a specific time period

xcodeiosiphone-sdk-3.0

提问by anas

How can I hide an image after a specific time period?

如何在特定时间段后隐藏图像?

回答by shannoga

The simplest way I know is to use:

我知道的最简单的方法是使用:

[self performSelector:@selector(hideImage) withObject:nil afterDelay:2.0];

and then set a method:

然后设置一个方法:

-(void)hideImage{

 image.hidden = YES;

}

For the hiding method it is really depends on what kind of image you are using and if you want to show it again later.

对于隐藏方法,它实际上取决于您使用的图像类型以及您以后是否想再次显示它。