gcd 延时方法

延时方法

- (void)gcdDelyMethod
{
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

        NSLog(@"延迟2秒执行--%@",[NSThread currentThread]);

    });

}//方法延时

猜你喜欢

转载自blog.csdn.net/sinat_34245894/article/details/77507014
gcd