随笔 - 399,  文章 - 0,  评论 - 7,  阅读 - 21万

随笔分类 -  OC 线程操作

OC 线程操作3 - NSOperation 实现线程间通信
摘要:1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 /** 6 图片 7 */ 8 @property (weak, nonatomic) IBOutlet UIImageView *imageView; 9 10 @end 11 12 @implementati... 阅读全文
posted @ 2018-07-04 12:03 懂事长qingzZ 阅读(242) 评论(0) 推荐(0) 编辑
OC 线程操作3 - NSOperation
摘要:1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 10 11... 阅读全文
posted @ 2018-07-04 11:14 懂事长qingzZ 阅读(144) 评论(0) 推荐(0) 编辑
OC - GCD 队列组 - 下载图片画图
摘要:- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ [self downloadImage]; } -(void)downloadImage{ dispatch_group_t group = di 阅读全文
posted @ 2018-06-28 11:48 懂事长qingzZ 阅读(172) 评论(0) 推荐(0) 编辑
OC 线程操作 - GCD队列组
摘要:1.队列组两种使用方法2.队列组等待 wait 阅读全文
posted @ 2018-06-28 10:31 懂事长qingzZ 阅读(479) 评论(0) 推荐(0) 编辑
OC 线程操作 - GCD快速迭代
摘要:- (void)forDemo{ //全都是在主线程操作的 for (NSInteger i = 0; i{number = 1, name = main} 2018-06-27 11:33:44.226845+0800 5线程操作-GCD-快速迭代[7715:77291] --{number = 1, name = main} 2018-06-27 11:3... 阅读全文
posted @ 2018-06-28 10:28 懂事长qingzZ 阅读(128) 评论(0) 推荐(0) 编辑
OC 线程操作 - GCD使用 - 栅栏函数
摘要:使用自己创建的 异步函数 打印结果: 使用全局并发队列 打印结果: 阅读全文
posted @ 2018-06-26 16:03 懂事长qingzZ 阅读(412) 评论(0) 推荐(0) 编辑
OC 线程操作 - GCD使用 -线程通讯, 延迟函数和一次性代码
摘要:- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // [self downImage]; // [self delay]; [self once]; [self once]; [self once]; } /** 一次性代码: 整个应用程序只会执行一次 不可以放在懒加... 阅读全文
posted @ 2018-06-26 15:40 懂事长qingzZ 阅读(538) 评论(0) 推荐(0) 编辑
OC 线程操作 - GCD使用 -同步函数,异步函数,串行队列,并发队列
摘要:1. 2 3. 4. 5. 8. 阅读全文
posted @ 2018-06-26 10:38 懂事长qingzZ 阅读(729) 评论(0) 推荐(0) 编辑
OC线程操作-GCD介绍
摘要:1. GCD介绍 1.11.2 1.3 异步具备开启能力但是不是 一定可以开启 1.4 1.5 67. 8. 阅读全文
posted @ 2018-06-26 10:04 懂事长qingzZ 阅读(111) 评论(0) 推荐(0) 编辑
NSThread 在主线操作的三个方法
摘要:- (void)createNSThread444{ UIImage *image = [UIImage imageNamed:@"图片名字"]; /** 1 performSelectorOnMainThread :在主线程操作 参数1:(nonnull SEL)方法名字 参数2:(nullable id) self 执行这... 阅读全文
posted @ 2018-06-26 09:38 懂事长qingzZ 阅读(240) 评论(0) 推荐(0) 编辑
runloop与线程的关系
摘要: 阅读全文
posted @ 2018-06-26 09:24 懂事长qingzZ 阅读(283) 评论(0) 推荐(0) 编辑
OC 线程操作2 - NSThread
摘要:方法1 :直接创建 alloc init - (void)createNSThread111{ /* 参数1: (nonnull id) 目标对象 self 参数2:(nonnull SEL) 方法选择器 ,调用的方法 参数3:(nullable id) 前面调用方法需要传递的参数 nil * // 阅读全文
posted @ 2018-06-22 11:49 懂事长qingzZ 阅读(222) 评论(0) 推荐(0) 编辑
OC 线程操作1 - pthread
摘要:#import "ViewController.h" #import <pthread.h> //1.需要包含这个头文件 @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [s 阅读全文
posted @ 2018-06-22 10:37 懂事长qingzZ 阅读(173) 评论(0) 推荐(0) 编辑


< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示