1.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self ad];
});
2.
// repeats 传YES 会间隔1.5秒继续调用ad方法
[NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(ad) userInfo:nil repeats:NO];
3.
[self performSelector:@selector(ad) withObject:nil afterDelay:1.5];
网友评论