我该怎么做才能在应用程序启动之前显示图像?

发布于 2024-11-08 15:40:14 字数 79 浏览 0 评论 0原文

我正在使用 Objective-c 为 iPhone 开发一个应用程序,在我的应用程序启动之前,我希望出现一个启动画面。

谢谢!

I´m doing an app for iPhone in objective-c, and before my app launches I want a splash screen to appear.

Thanks!

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

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

发布评论

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

评论(4

梨涡 2024-11-15 15:40:14

我认为您正在寻找 应用程序启动图像

I think you are looking for Application Launch Images.

七颜 2024-11-15 15:40:14

您只需将任何想要的图像重命名为“Default.png”,然后将其添加到您的项目中即可。就这样。应用程序将在加载应用程序时显示该图像。

You just need to rename any image you want to "Default.png" and just add it in your project. That's all. Application will display that image while your app is loading.

动次打次papapa 2024-11-15 15:40:14

正如 veredesmaralad 回答的那样,您可以使用应用程序启动图像,但它并不是真正用作启动屏幕。其目的是向用户提供应用程序正在启动的即时反馈,同时给应用程序一些时间进行初始化。该图像由操作系统显示,直到您的应用程序将其窗口显示在屏幕上。显示时间因设备而异。

如果我尝试做一些更复杂的事情,例如更长时间地显示启动屏幕或为启动屏幕设置动画,我会显示启动屏幕的视图,然后转到主应用程序。我可能只是让我的主 UIViewController 显示视图,然后让 NSTimer 告诉控制器何时用下一个视图(例如主用户界面)替换该视图。对于更复杂的动画启动屏幕,我可能会使用专用的 UIViewController 来运行该动画。然后,当动画完成时,我会让启动屏幕的控制器加载下一个控制器。

As veredesmaralad answered, you can use an application launch image, but it's not really intended for use as a splash screen. It's intended to give the user immediate feedback that the app is launching, yet give the app some time to initialize. This image is displayed by the OS until your app puts its window on screen. The display time will vary from device to device.

If I were trying to do something more involved such as displaying the splash screen for a longer time, or animating the splash screen, I would display a view for the splash screen, then move on to the main app. I might just have my main UIViewController show the view, and then have an NSTimer tell the controller when to replace the view with the next view (e.g. the main user interface). For a more involved animated splash screen I might use a dedicated UIViewController to run that animation. Then when the animation completes I'd have the splash screen's controller load the next controller.

时光沙漏 2024-11-15 15:40:14

首先,这称为“启动屏幕”,您可能想从类似维基百科的地方阅读有关它的内容< /a>.

这个问题的答案在很大程度上取决于您使用的编程语言。如果您能提供更好的解释,就能给出更好的答案。

First off, this is called a "splash screen" and you may want to read up about it from somewhere like Wikipedia.

The answer to this question will depend heavily on what programming language you're using. If you could provide better explanation, a better answer can be given.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文