iOS开发之延时执行

方法1:

performSelector(SEL) withObjects:(id) afterDelay:(NSTimeInterval);

方法2:

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

//需要延时执行的代码

});

posted @ 2015-08-31 19:08  Ray_hok  阅读(129)  评论(0编辑  收藏  举报