代码改变世界

iOS 延迟执行

2015-11-07 18:00  Y了个J  阅读(171)  评论(0编辑  收藏  举报

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(<#delayInSeconds#> * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

            <#code to be executed after a specified delay#>

        });

<#delayInSeconds#> 延迟时间

 <#code to be executed after a specified delay#> 延迟内容