Reputation: 5172
I have following problem. In my app I'm downloading .xml file from server and then parsing it. I call both methods (get and parse) from application:willFinnishLaunchingWithOptions.
Right after parsing is posted notification. In main table view controller is observer and selector is supposed to reload table view. But it doesn't. ViewDidLoad in TVC is called before parsing is completed, also before launching screen disappears.
So my question is: Is possible to freeze application:didFinishLaunchingWithOption till all data are parsed? Thanks
Upvotes: 0
Views: 35
Reputation: 780
No its not possible. What you could do: Don't show your TVC. Show a loading Controller. This Controller will do the work with loading the data and parsing it. When its done you can call your TVC
For Example:
func downloadXML(success: blockStuff, failure: blockstuff)
. In the success your provide the parsingFeel free to ask or comment :)
Upvotes: 1