double delayInSeconds = 5.0;dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ NSLog(@"这里执行新的内容");});
本文共 260 字,大约阅读时间需要 1 分钟。
double delayInSeconds = 5.0;dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ NSLog(@"这里执行新的内容");});
转载于:https://my.oschina.net/u/554046/blog/633199