Referencing question: https://stackoverflow.com/a/24725314/2909692, I have the same application requirements in that I need a series of methods to be called, only after data has been loaded from web.
I have reviewed and researched the answer (summed below), but do not understand how it is to be implemented, what are the parameters that need to be passed?
How is loadShows to be used?
func application(application: UIApplication!, performFetchWithCompletionHandler completionHandler: ((UIBackgroundFetchResult) -> Void)!) {
loadShows() {
completionHandler(UIBackgroundFetchResult.NewData)
println("Background Fetch Complete")
}
}
func loadShows(completionHandler: (() -> Void)!) {
//....
//DO IT
//....
completionHandler()
})