Last active
March 5, 2016 05:03
-
-
Save bauloc/f2171da6547a71697741 to your computer and use it in GitHub Desktop.
performBlock after delay
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
+ (void) performBlock:(void(^)())block afterDelay:(NSTimeInterval)delay { | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), block); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment