Skip to content

Instantly share code, notes, and snippets.

@bauloc
Last active March 5, 2016 05:03
Show Gist options
  • Save bauloc/f2171da6547a71697741 to your computer and use it in GitHub Desktop.
Save bauloc/f2171da6547a71697741 to your computer and use it in GitHub Desktop.
performBlock after delay
+ (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