dispatch_semaphore

摘要: 信号量 wait减1,signal加1,它是线程安全的,下面从网上找了两个例子,这个很灵活 一个是可以控制最大下载并发数 一个是可以一个一个的执行任务 阅读全文
posted @ 2017-10-31 21:48 wxm5558 阅读(145) 评论(0) 推荐(0) 编辑

dispatch_set_target_queue

摘要: http://www.cnblogs.com/denz/p/5214297.html http://www.jianshu.com/p/188d9bf62f23 参考这2篇文章 dispatch_set_target_queue函数的作用 1.设置线程池优先级 2.创建队列的层次体系,当我们想让不同 阅读全文
posted @ 2017-09-26 16:56 wxm5558 阅读(177) 评论(0) 推荐(0) 编辑

iOS charles支持https抓包

摘要: 参考如下网页教程 http://blog.csdn.net/yangmeng13930719363/article/details/51645435 阅读全文
posted @ 2017-05-28 22:01 wxm5558 阅读(113) 评论(0) 推荐(0) 编辑

ios8 毛玻璃效果

摘要: UIBlurEffect * blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; UIVisualEffectView * effe = [[UIVisualEffectView alloc]initWithEffect:blur 阅读全文
posted @ 2017-05-17 18:21 wxm5558 阅读(70) 评论(0) 推荐(0) 编辑

工程里配置.xconfig文件

摘要: 很多时候xcode里面的build settings各个配置项目比较麻烦 区分好debug,release环境,不同的环境有不同的配置项,也比较麻烦 1.新建一个configureation文件 2.关联配置文件 3.修改已经有的配置项目 选择要设置的项目,右键复制 4.添加xconfig文件配置项 阅读全文
posted @ 2017-03-30 18:10 wxm5558 阅读(403) 评论(0) 推荐(0) 编辑

线程安全的nsmutabledictionary(读weex代码)

摘要: #import /** * @abstract Thread safe NSMutableDictionary */ @interface WXThreadSafeMutableDictionary : NSMutableDictionary @end #import "WXThreadSafeMutableDictionary.h" @interface WXThreadSafe... 阅读全文
posted @ 2017-03-07 21:15 wxm5558 阅读(670) 评论(0) 推荐(0) 编辑

关于信号量以及多线程的代码

摘要: #define MAX_CONCURRENT_COUNT 8 static dispatch_semaphore_t WXDisplayConcurrentSemaphore; @implementation WXDisplayQueue + (dispatch_queue_t)displayQueue { static dispatch_queue_t displayQueue ... 阅读全文
posted @ 2017-03-07 21:10 wxm5558 阅读(115) 评论(0) 推荐(0) 编辑

dispatch_set_target_queue测试

摘要: dispatch_set_target_queue会将其他queue转为和targetqueue一样的优先级和执行时序,看下面的例子 即使queue1,queue2,queue3,都是并行的queue,但是输出结果仍然是串行的结果; 2017-03-07 20:31:11.636 DispatchT 阅读全文
posted @ 2017-03-07 20:32 wxm5558 阅读(134) 评论(0) 推荐(0) 编辑

dyld: Library not loaded问题解决

摘要: dyld: Library not loaded: @rpath/Ono.framework/Ono Referenced from: /Users/xiaomanwang/Library/Developer/CoreSimulator/Devices/2E413916-E22B-462C-B19B 阅读全文
posted @ 2017-02-22 17:30 wxm5558 阅读(531) 评论(0) 推荐(0) 编辑

iOS图片上加标签或者水印

摘要: 直接贴代码吧 UIImage+Text.h UIImage+Text.m 调用举例 阅读全文
posted @ 2016-12-11 22:56 wxm5558 阅读(295) 评论(0) 推荐(0) 编辑