Last active
October 26, 2015 14:41
-
-
Save bobgodwinx/8725992b369c422b55d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Telling the system to dispatch after 2 seconds on the main queue | |
*/ | |
let dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(2.00 * Double(NSEC_PER_SEC))) | |
dispatch_after(dispatchTime, dispatch_get_main_queue()) { [weak self] in | |
guard let strongSelf = self, let aProperty = aProperty else { | |
return | |
} | |
// Do something with aProperty | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment