GCD队列有延迟

时间:2014-04-23 17:54:41

标签: ios multithreading queue grand-central-dispatch

如何创建延迟1秒的队列?我无法使用NSTimer,因为我传递了CoreData Entity

1 个答案:

答案 0 :(得分:0)

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
//Do whatever after 1 second
});