1.nstimer
可取消
[NSTimer scheduledTimerWithTimeInterval:1/30.0f repeats:true block:^(NSTimer * _Nonnull timer) {
//代碼
}];
- dispatch
多線程延遲陶衅,缺點->無法取消
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delayTime * NSEC_PER_SEC), dispatch_get_main_queue(), block);