Objective-C – 从iOS 4到iOS 5的应用启动方法的差异?

Objective-C – 从iOS 4到iOS 5的应用启动方法的差异?,第1张

概述我最初为iOS 4开发了我的应用程序,现在iOS 5已经出来我决定开发iOS 5 SDK,现在似乎打破了我的应用程序. 我有一个标签栏应用程序,每个选项卡中都有一个导航控制器. 在iOS 4中,-application:didFinishLaunchingWithOptions:方法中的所有内容在启动后首先执行.执行该方法后,加载了第一个选项卡的视图控制器. 因此,当我记录我的启动应用程序进程(运 我最初为iOS 4开发了我的应用程序,现在iOS 5已经出来我决定开发iOS 5 SDK,现在似乎打破了我的应用程序.

我有一个标签栏应用程序,每个选项卡中都有一个导航控制器.

在iOS 4中,-application:dIDFinishLaunchingWithOptions:方法中的所有内容在启动后首先执行.执行该方法后,加载了第一个选项卡的视图控制器.

因此,当我记录我的启动应用程序进程(运行iOS 4.3的模拟器)时,它看起来像这样:

-[AcandoAppDelegate application:dIDFinishLaunchingWithOptions:] [line 35] dIDFinishLaunchingWithOptions method running-[AcandoAppDelegate application:dIDFinishLaunchingWithOptions:] [line 60] This should be executed first // And it does as it should-[AcandoAppDelegate applicationDIDBecomeActive:] [line 254] applicationDIDBecomeActive method running-[SeminarsVIEwController vIEwDIDLoad] [line 58] 2 - vIEwDIDLoad method running-[SeminarsVIEwController vIEwDIDLoad] [line 60] This should be executed second // Also as it should-[SeminarsVIEwController vIEwWillAppear:] [line 123] 3 - vIEwWillAppear method running-[SeminarsVIEwController vIEwDIDAppear:] [line 173] vIEwDIDAppear running

现在,当我记录我的启动应用程序进程(运行iOS 5.0的模拟器)时,它看起来像这样:

-[AcandoAppDelegate application:dIDFinishLaunchingWithOptions:] [line 35] dIDFinishLaunchingWithOptions method running-[SeminarsVIEwController vIEwDIDLoad] [line 58] 2 - vIEwDIDLoad method running-[SeminarsVIEwController vIEwDIDLoad] [line 60] This should be executed second // So this should be executed second but is executed first-[SeminarsVIEwController vIEwWillAppear:] [line 123] 3 - vIEwWillAppear method running-[AcandoAppDelegate application:dIDFinishLaunchingWithOptions:] [line 60] This should be executed first // And this is executed second but should be executed first-[AcandoAppDelegate applicationDIDBecomeActive:] [line 254] applicationDIDBecomeActive method running-[SeminarsVIEwController vIEwDIDAppear:] [line 173] vIEwDIDAppear running

我错过了一些明显的东西吗?对我来说,看起来我们在iOS 4和iOS 5之间有两种不同的启动情况?

解决方法 为什么您的应用程序的成功启动取决于这些事件的特定顺序?在上面的那些序列中应该没有任何内容导致您发布,您的代码应该忘记确切的底层启动序列.

你能否提供一些代码来解释为什么这会导致你出现问题?

总结

以上是内存溢出为你收集整理的Objective-C – 从iOS 4到iOS 5的应用启动方法的差异?全部内容,希望文章能够帮你解决Objective-C – 从iOS 4到iOS 5的应用启动方法的差异?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1040685.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存