
多线程
文章平均质量分 81
安哥iOS
这个作者很懒,什么都没留下…
展开
-
iOS多线程之GCD之NSOperation && NSOperationQueue
iOS多线程之GCD之NSOperation && NSOperationQueue #import "ViewController.h" @interface ViewController () @end @implementation ViewController /* 1. NSOperation的作用 配合使用NSOperation和NSOperationQueue也能实现多线原创 2015-01-06 13:19:34 · 152 阅读 · 0 评论 -
多线程之NSThread
多线程之NSThread - (IBAction)btn:(UIButton *)sender { // 获得当前线程 NSLog(@"btn = %@",[NSThread currentThread]); // 1.初始化方法创建线程 NSThread *thread = [[NSThread alloc] initWithTarget原创 2014-12-30 16:51:15 · 95 阅读 · 0 评论 -
iOS多线程之GCD
GCD (Grand Central Dispatch) 大中央分配(调度) GCD简介 Grand Central Dispatch 简称(GCD)是苹果公司开发的技术。以优化应用程序支持多核心处理器和其他的对称多处理系统的系统。 GCD属于函数级的多线程,性能更高,功能也更加强大 GCD核心概念 任务:具有一定功能的代码段。一般是一个block或者函数。原创 2015-01-01 21:56:35 · 128 阅读 · 0 评论 -
iOS多线程之NSThread
iOS多线程之NSThread 一个NSThread对象就代表一条线程 1. 创建,启动线程 NSThread*thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil]; [thread start]; // 线程一启动,就会在线程thread原创 2015-01-01 16:18:13 · 142 阅读 · 0 评论