ios多线程的管理写一个类
2019-01-22 本文已影响0人
chance395
1.刚写了一个类来封装平时用的多线程写了后发现用的实例方法每次需要实例化就有点臃肿,后面采用类方法来搞,利用了runtime来动态添加属性
2.包含了调取主线程,延时,全局队列,并行异步,同步这些常用功能
我直接截图就不贴代码了,抛砖引玉







个人感觉用处最大的可能是最后一个方法,哈哈
截图一个使用的地方 发现还是有效的

ok 就这样。还有什么方法以后添加 最近在写一个大的框架 有机会上cocoapods