Execute a block after some delay


/ Published in: Objective C
Save to your folder(s)

enqueue a block at a certain time


Copy this code and paste it in your HTML
  1. double delayInSeconds = 15.0;
  2. dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
  3.  
  4. dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
  5.  
  6. [self fooFirstInput:first secondInput:second];
  7.  
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.