我最初爲iOS 4開發了我的應用程序,現在iOS 5已經出來,我決定爲iOS 5 SDK開發,現在好像破壞了我的應用程序。Objective-C - 應用程序啓動方法從iOS 4到iOS 5的區別?
我在每個選項卡中都有一個帶有導航控制器的選項卡欄應用程序。
在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之間有兩種不同的啓動情況?
如果您多次測試,結果是否相同? –
每次結果都一樣。在iOS 5中處理.xib文件(在我的情況下是MainWindow.xib)與iOS 4相比有什麼不同? –