随笔分类 -  多线程

队列组的简单使用
摘要:#import "HMViewController.h"// 1.分别下载2张图片:大图片、LOGO// 2.合并2张图片// 3.显示到一个imageView身上@interface HMViewController ()@property (weak, nonatomic) IBOutlet U... 阅读全文

posted @ 2015-10-30 19:51 ZMIOS 阅读(944) 评论(0) 推荐(0) 编辑

多线程的延时执行和一次性代码
摘要:延时执行的方法:- (void)delay3{ // 3秒后回到主线程执行block中的代码// dispatch_queue_t queue = dispatch_get_main_queue();// dispatch_after(dispatch_time(DISPATCH_... 阅读全文

posted @ 2015-10-30 19:50 ZMIOS 阅读(332) 评论(0) 推荐(0) 编辑

GCD线程间的通信
摘要:#define HMGlobalQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)#define HMMainQueue dispatch_get_main_queue()#import "HMViewControl... 阅读全文

posted @ 2015-10-30 19:39 ZMIOS 阅读(159) 评论(0) 推荐(0) 编辑

GCD"牛逼的中枢调度器"
摘要:GCD的基本使用:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // dispatch_sync : 同步,不具备开启线程的能力 // dispatch_async : 异步,具备开启线程的能力 ... 阅读全文

posted @ 2015-10-30 19:29 ZMIOS 阅读(261) 评论(0) 推荐(0) 编辑

线程间的通信
摘要:#import "HMViewController.h"@interface HMViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation HMViewContro... 阅读全文

posted @ 2015-10-30 19:19 ZMIOS 阅读(142) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示