上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: #import "ViewController.h" @interface ViewController () @property (nonatomic,assign) int ticket; @end @implementation ViewController - (void)viewDidLo 阅读全文
posted @ 2020-02-10 18:42 ZhangShengjie 阅读(427) 评论(0) 推荐(0) 编辑
摘要: #define kSemaphoreBegin \ static dispatch_semaphore_t semaphore; \ static dispatch_once_t onceToken; \ dispatch_once(&onceToken, ^{ \ semaphore = disp 阅读全文
posted @ 2020-02-10 18:38 ZhangShengjie 阅读(887) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" #import <pthread.h> @interface ViewController () @property (nonatomic, strong) NSCondition *lock; @property (nonatomic, str 阅读全文
posted @ 2020-02-09 23:08 ZhangShengjie 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 线程同步的本质是每一条线程的同步都是按顺序的 #import "ViewController.h" #import <libkern/OSAtomic.h> @interface ViewController () @property (nonatomic,assign) int ticket; / 阅读全文
posted @ 2020-02-07 22:55 ZhangShengjie 阅读(701) 评论(0) 推荐(0) 编辑
摘要: - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ dispatch_queue_t queue = dispatch_get_global_queue(0, 0); dispatch_async( 阅读全文
posted @ 2020-02-06 16:36 ZhangShengjie 阅读(340) 评论(0) 推荐(0) 编辑
摘要: // dispatch_queue_t queue = dispatch_get_global_queue(0, 0); //全局队列 dispatch_queue_t queue3 = dispatch_queue_create("queu3", DISPATCH_QUEUE_CONCURRENT 阅读全文
posted @ 2020-01-20 17:18 ZhangShengjie 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 1、最近做项目、文件存储服务器是用的亚马逊的、如果直接访问、下载其资源速度很慢、所以需要在网络请求的时候添加一个代理、加速网络访问 2、代理服务器是一个HTTPS 的一个服务器 3、思路、解决方案、利用运行时机制(添加分类NSURLSession+Change)针对 NSURLSession 初始化 阅读全文
posted @ 2020-01-13 17:35 ZhangShengjie 阅读(1540) 评论(0) 推荐(0) 编辑
摘要: KVC 其实就是键值编码 1、赋值其实就两个方法 setValue: forKey 给对象的某个属性值赋值 setValue:forKeyPath 给对象的某个属性中的属性赋值 2、获取值其实也是两个方法 valueForKey 获取对象的某个属性值 valueForKeyPath 获取对象的某个属 阅读全文
posted @ 2019-12-26 00:55 ZhangShengjie 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 基本原理-> 给一个对象的属性添加监听 当属性值发生变化时 会触发监听器的监听的方法 #import "ViewController.h" #import "Person.h" @interface ViewController () @property (nonatomic, strong) Pe 阅读全文
posted @ 2019-12-25 00:36 ZhangShengjie 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 最终效果图 item2地址 https://iterm2.com 下载item2配色包 http://iterm2colorschemes.com 下载然后倒入到item2中 使用的颜色是 在配合oh my zsh GitHub地址 https://github.com/ohmyzsh/ohmyzs 阅读全文
posted @ 2019-12-10 13:30 ZhangShengjie 阅读(499) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页