标签:queue priority lob 1.5 rms tor def led default
1. [self performSelector:@selector(fangfa) withObject:nil afterDelay:0.5]; // performSelector
2. [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(fangfa) userInfo:nil repeats:NO]; //NSTimer
//GCD
//在主线程延迟执行 一般用这个
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self delayDo:@"GCD"];
});
//在子线程延迟执行
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self delayDo:@"Global-GCD"];
});
标签:queue priority lob 1.5 rms tor def led default
原文地址:http://www.cnblogs.com/xingxiaoxiao/p/7688051.html