如何更改点击应用程序徽标后出现图像的时间?

发布于 2024-10-23 11:08:51 字数 157 浏览 1 评论 0原文

每当我们单击 Iphone 应用程序时...

就会出现一个图像,该图像会保留一段时间...

然后它就会消失...

而真正的窗口...我的意思是我们的编程屏幕出现...

现在我希望该图像保留有一段时间..

如何做到这一点?

Whenever we click on the Iphone application...

An Image appears that stays for a while...

and after that it disappeared...

and the real window..i mean our programmed screen appears..

now I want that Image to stay for a while..

How to do this??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只为守护你 2024-10-30 11:08:52

您所说的图像是启动屏幕,它会一直显示,直到操作系统加载应用程序的资源并启动它,捆绑包中其图像文件的默认名称是 Default.png。如果您希望它显示更长时间,您需要使用图像创建一个图像视图,将其放在屏幕上,并在一段时间后将其删除,可能是在 applicationDidFinishLaunching 方法中。类似的东西

UIImageView *imageViewSplash = [[[UIImageView alloc] initWithFrame:window.frame] autorelease]; 
imageViewSplash.image = [UIImage imageNamed:@"Default.png"];
[self.viewController.view addSubview:imageViewSplash];
[imageViewSplash performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2]; 
// change the '2' to some constants that represents for how many extra seconds you want the splash screen to be displayed

The image you're talking about is the splash screen, it's displayed until the OS loads your app's resources and launches it, the default name for it's image file in the bundle is Default.png. If you want it to be displayed for abit longer, you'll need to create an image view with the image, put it on the screen, and remove it after a while, probably in the applicationDidFinishLaunching method. something like

UIImageView *imageViewSplash = [[[UIImageView alloc] initWithFrame:window.frame] autorelease]; 
imageViewSplash.image = [UIImage imageNamed:@"Default.png"];
[self.viewController.view addSubview:imageViewSplash];
[imageViewSplash performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2]; 
// change the '2' to some constants that represents for how many extra seconds you want the splash screen to be displayed
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文