随笔分类 - 多线程
摘要://设置按钮里面图片和文字的间距 btn.titleEdgeInsets=UIEdgeInsetsMake(0, 20, 0, 0); button.imageEdgeInsets = UIEdgeInsetsMake(5,13,21,button.titleLabel.bounds.siz...
阅读全文
摘要:1 /** 2 GCD两个核心概念:任何和队列 3 4 任务:执行什么操作 5 队列:用来存放任务 6 7 使用就2个步骤 8 1.定制任务 9 2.将任务添加到队列中 10 11 任务的取出队列原则:FIFO原则: 先进先出,后进后出12 13 */14 15 #im...
阅读全文
摘要:1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 @property (weak, nonatomic) IBOutlet UIImageView *imageView; 5 @end 6 7 @implem...
阅读全文
摘要:1 // 2 /** 3 * 线程的注意点 4 1.不要同时开太多线程,(1-3条即可,最多不要超过5条) 5 6 线程概念: 7 1.主线程: UI线程,显示、刷新UI界面、处理UI控件的事件 8 2.子线程(异步线程、后台线程) 9 10 3.不要把耗时...
阅读全文
摘要:1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 @property (nonatomic, strong) NSThread *thread; 5 @end 6 7 @implementation HMVi...
阅读全文
摘要:1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 5 @end 6 7 @implementation HMViewController 8 9 - (void)viewDidLoad10 {11 ...
阅读全文
摘要:1 #import "ILViewController.h" 2 3 @interface ILViewController () 4 5 @end 6 7 @implementation ILViewController 8 9 - (void)viewDidLoad10 {11 ...
阅读全文

浙公网安备 33010602011771号