摘要: 1.延迟操作2.一次性代码3.队列组/** * 延迟执行 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // 2秒后异步执... 阅读全文
posted @ 2015-04-29 01:22 幻想无极 阅读(406) 评论(0) 推荐(0) 编辑
摘要: //(1)用异步函数往并发队列中添加任务,//总结:同时开启三个子线程- (void)test1 { //1.获得全局的并发队列 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY... 阅读全文
posted @ 2015-04-29 00:51 幻想无极 阅读(283) 评论(0) 推荐(0) 编辑
摘要: //// block.h// Block//// Created by tqh on 15/4/12.// Copyright (c) 2015年 tqh. All rights reserved.//#import typedef void(^block1) (id obj);typede... 阅读全文
posted @ 2015-04-29 00:28 幻想无极 阅读(371) 评论(0) 推荐(0) 编辑