Mmmmm…. Success!!!


Or something that tastes a bit like it!

I know, last post, I said I would discuss my foray into Github. I was premature with that statement.

I was running into an issue where I needed something to run (func1), but only AFTER something else did (func2), because func2 depended on the results of func1. You know something that is perfect for this? The Completion Handler!

But I had never written one myself, I only used them in existing functions provided by the IDE. So begins the search. (For anyone who know, this does mean Google and StackOverflow…) After about an hour, I was coming up with the same results. There are plenty of people hosting “tutorial” sites, but many of them copy the data from the developer site, and thats about it.

About 15  seconds before the laptop was going to need to learn to fly or fall, I stumbled across this tutorial from Vea Software. It opened my eyes as it EXPLAINS how to build a completion handler. It tied together the elements I couldn’t see. Forest for the trees and all that.

I now have a MUCH better, but not perfect understanding about the use and creation of my current buddy, the completion handler!

,