延迟1s钟执行
double delayInSeconds = 1.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(@"延迟1s执行");
});
(int64_t)(delayInSeconds * NSEC_PER_SEC)//纳秒为单位,