- //延迟多少秒后执行block里的方法
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1(延迟的秒数) * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
});
- //表名2秒钟之后调用自定义的run方法
[self performSelector:@selector(run) withObject:nil afterDelay:2.0];
- //延迟2秒后,每个2秒调用一次自定义的run方法
[NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(run) userInfo:nil repeats:YES];
浙公网安备 33010602011771号