double delayInSeconds = 1.0;
__block ViewController* bself = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//延时操作
[self doSomething];
});
double delayInSeconds = 1.0;
__block ViewController* bself = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//延时操作
[self doSomething];
});
本文标题:ios dispatch_after 延时操作
本文链接:https://www.haomeiwen.com/subject/cdduohtx.html
网友评论