iPhone:UIApplicationDelegate 和启动图像?

发布于 2024-11-08 11:11:54 字数 130 浏览 0 评论 0原文

UIApplication Delegate 中调用的第一个方法是什么?我在我的应用程序中包含了一个启动图像,并且我想在屏幕仍然打开时、在我的实际视图出现之前开始下载一些数据。我是否应该在委托中进行这些调用,或者我应该首先考虑在哪里进行这些调用?

What is the first method that gets called in the UIApplication Delegate? I have included a launch image in my application, and I would like to get a head start on downloading some data while that screen is still up, before my actual views appear. Should I be looking to place these calls in the delegate, or where is the first place I should think about making these calls?

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

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

发布评论

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

评论(2

硪扪都還晓 2024-11-15 11:11:54
- (void)applicationDidFinishLaunching:(UIApplication *)application

首先被呼叫。

编辑:
当应用程序启动时,您的 Default.png 会出现很短的时间。你不能依靠这么短的时间来进行一些处理。

您可以显示您的第一个视图,并显示一条下载正在进行中的消息(借助活动指示器视图)

- (void)applicationDidFinishLaunching:(UIApplication *)application

gets called first.

EDIT:
Your Default.png appears for short time when the app is launched. You cannot rely on this short time to do some processing.

You can show your first view with a message that download is in process (with the help of activity indicator view)

呆头 2024-11-15 11:11:54

考虑第一个答案(首先调用 - (void)applicationDidFinishLaunching:(UIApplication *)application ),但是如果您想在第一个视图上显示下载的图像,请实现一些延迟(BY计时器或其他东西直到您的图像下载),是的,不要忘记在屏幕之间实现一个带有活动初始化的屏幕(否则您的应用程序看起来会挂起)。

Consider the First answer(as - (void)applicationDidFinishLaunching:(UIApplication *)application called at all first), BUT if you want to display your downloaded image on your first view, then implement some delay (BY Timer or something till your image download), and yeah don't forgot to implement an in between screen with activity initializar(otherwise your application will seem like hanged).

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