Created
January 18, 2013 15:56
-
-
Save davidahouse/4565554 to your computer and use it in GitHub Desktop.
dispatch_once to run a block of code only one time ever
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
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// your code here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment