延时方法
- (void)gcdDelyMethod
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NSLog(@"延迟2秒执行--%@",[NSThread currentThread]);
});
}//方法延时
延时方法
- (void)gcdDelyMethod
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NSLog(@"延迟2秒执行--%@",[NSThread currentThread]);
});
}//方法延时