iPhone:UIApplicationDelegate 和启动图像?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先被呼叫。
编辑:
当应用程序启动时,您的 Default.png 会出现很短的时间。你不能依靠这么短的时间来进行一些处理。
您可以显示您的第一个视图,并显示一条下载正在进行中的消息(借助活动指示器视图)
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)
考虑第一个答案(首先调用 - (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).