-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathatom.xml
655 lines (509 loc) · 107 KB
/
atom.xml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>百度Hi iOS团队技术周报</title>
<link href="/atom.xml" rel="self"/>
<link href="http://baiduhidevios.github.io/"/>
<updated>2018-03-04T14:28:03.000Z</updated>
<id>http://baiduhidevios.github.io/</id>
<author>
<name>BaiduHiDeviOS</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>2018-03-04技术周报</title>
<link href="http://baiduhidevios.github.io/2018/03/04/2018-03-04%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2018/03/04/2018-03-04技术周报/</id>
<published>2018-03-04T14:12:15.000Z</published>
<updated>2018-03-04T14:28:03.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="https://www.jianshu.com/p/a98c871cc3fd" target="_blank" rel="external">UIScrollView && UITableView && UICollectionView</a></p>
<p>2.<a href="https://neyoufan.github.io/2017/04/19/ios/网易HubbleData无埋点SDK在iOS端的设计与实现/" target="_blank" rel="external">网易HubbleData无埋点SDK在iOS端的设计与实现</a></p>
<p>3.<a href="https://mp.weixin.qq.com/s/CiqMlEIp1Ir2EJSDGgMooQ" target="_blank" rel="external">iOS微信内存监控</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><p>1.<a href="https://www.jianshu.com/p/83b99f34d67c" target="_blank" rel="external">对于 iOS 开发,人工智能意味着什么?</a></p>
<p>2.<a href="http://www.cocoachina.com/ios/20180224/22329.html" target="_blank" rel="external">移动 APP 网络优化概述</a></p>
<p>3.<a href=":http://iosfly.com/2016/12/03/HTTPDNS/">移动解析HTTPDNS在App开发中实践总结</a></p>
<p>4.<a href="https://mp.weixin.qq.com/s/z4RFP3Y0UGUrSiwcSN72GA" target="_blank" rel="external">谷歌今日上线基于TensorFlow的机器学习速成课程(中文版)</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a hr
</summary>
</entry>
<entry>
<title>2018-01-20技术周报</title>
<link href="http://baiduhidevios.github.io/2018/01/20/2018-01-20%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2018/01/20/2018-01-20技术周报/</id>
<published>2018-01-20T07:48:28.000Z</published>
<updated>2018-01-20T08:14:22.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://github.com/Lax/iOS-Swift-Demos" target="_blank" rel="external">Swift学习资源大礼包</a>:哈哈 新年大礼包~~快上车</p>
<p>2.<a href="https://mp.weixin.qq.com/s?__biz=MzA3ODg4MDk0Ng==&mid=2651114138&idx=1&sn=a02787b9faa8c8bd0afb19922b60f982" target="_blank" rel="external">2017最受欢迎的30个Swift 库,你关注到了吗?</a></p>
<p>3.<a href="https://www.jianshu.com/p/3a3bf236e85e" target="_blank" rel="external">[Swift] 2017年33个必须了解的iOS开源库</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.cocoachina.com/ios/20180118/21902.html" target="_blank" rel="external">从 Aspects 源码中我学到了什么</a></p>
<p>2.<a href="https://www.jianshu.com/p/be9a0a088feb" target="_blank" rel="external">iOS图片加载框架-SDWebImage解读</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a hr
</summary>
</entry>
<entry>
<title>2018-01-14技术周报</title>
<link href="http://baiduhidevios.github.io/2018/01/20/2018-01-14%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2018/01/20/2018-01-14技术周报/</id>
<published>2018-01-20T07:33:01.000Z</published>
<updated>2018-01-20T07:46:43.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><h6 id="介绍两款数据格式转换的神器"><a href="#介绍两款数据格式转换的神器" class="headerlink" title="介绍两款数据格式转换的神器^_^"></a>介绍两款数据格式转换的神器^_^</h6><p>1.<a href="https://github.com/typwr/typewriter" target="_blank" rel="external">Typewriter</a>:typewriter是客户端翻译服务端数据交换格式的代码翻译器</p>
<p>2.<a href="https://github.com/quicktype/quicktype-xcode" target="_blank" rel="external">QuickType</a>:QuickType也是一款数据类型翻译器,它从Json数据中推断出数据类型,然后转换成相应的数据模型。</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="https://juejin.im/post/5a3214a451882503eb4b4bed" target="_blank" rel="external">iOS 花式二维码生成和二维码识别</a>:EFQRCode 是一个用 Swift 编写的用来生成和识别二维码的库,基于 CoreImage 进行开发。亮点是支持Gif生成动态二维码。</p>
<p>2.<a href="https://www.jianshu.com/p/e5a52409ffd5" target="_blank" rel="external">基于TableStore/MaxCompute的数据采集分析系统介绍</a>:TableStore(表格存储)是阿里云自主研发的专业级分布式NoSQL数据库,是基于共享存储的高性能、低成本、易扩展、全托管的半结构化数据存储平台,支撑互联网和物联网数据的高效计算与分析。</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自:nolol、DemoCooky"></a>本期周报内容来自:<a hr
</summary>
</entry>
<entry>
<title>2018-01-07技术周报</title>
<link href="http://baiduhidevios.github.io/2018/01/07/2018-01-07%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2018/01/07/2018-01-07技术周报/</id>
<published>2018-01-07T15:09:40.000Z</published>
<updated>2018-01-07T15:21:44.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、eggInBlack"><a href="#本期周报内容来自-nolol、eggInBlack" class="headerlink" title="本期周报内容来自:nolol、eggInBlack"></a>本期周报内容来自:<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/orgs/BaiduHiDeviOS/people/eggInBlack" target="_blank" rel="external">eggInBlack</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="http://www.cocoachina.com/ios/20180103/21732.html" target="_blank" rel="external">新年新语言,WCDB Swift</a>:WCDB 作为微信的终端数据库,从 2017.6 开源至今,共迭代了 5 个版本,如今终于正式发布了 WCDB Swift 的第一个正式版本。</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="https://juejin.im/post/5a33a6926fb9a045104a8d3c" target="_blank" rel="external">iOS 上的 FlexBox 布局</a>:FlexBox 是一种 UI 布局方式,并得到了所有浏览器的支持,其强大之处在于灵活的布局技巧以及相比于AutoLayout界面渲染更加的流畅。【推荐】</p>
<p>2.<a href="https://juejin.im/entry/59924874518825485e1d5129" target="_blank" rel="external">Yoga 教程: 使用跨平台布局引擎</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><p>1.<a href="http://blog.csdn.net/u010011236/article/details/53026127" target="_blank" rel="external">PCM、WAV格式介绍及用C语言实现PCM转WAV</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、eggInBlack"><a href="#本期周报内容来自-nolol、eggInBlack" class="headerlink" title="本期周报内容来自:nolol、eggInBlack"></a>本期周报内容来自:<a
</summary>
</entry>
<entry>
<title>2017-10-29技术周报</title>
<link href="http://baiduhidevios.github.io/2017/10/29/2017-10-29%E6%9C%9F%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/10/29/2017-10-29期技术周报/</id>
<published>2017-10-29T07:36:58.000Z</published>
<updated>2017-11-26T15:14:11.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://onevcat.com/2017/10/swift-error-category/" target="_blank" rel="external">关于 Swift Error 的分类</a><br>2.<a href="http://www.jianshu.com/p/3bedf1de5cb3" target="_blank" rel="external">What’s New in Swift 4?</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://mp.weixin.qq.com/s/kOEW_aeo__uv4V9xbkWVvA" target="_blank" rel="external">《手管iPhoneX的适配总结》</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><p>1.<a href="http://www.jianshu.com/p/f16d7f3c8d5f" target="_blank" rel="external">TCP/IP(一):数据链路层</a><br>2.<a href="http://www.jianshu.com/p/9cb5cf1864da" target="_blank" rel="external">TCP/IP(二):IP协议</a><br>3.<a href="http://www.jianshu.com/p/f0d5a8ee9f17" target="_blank" rel="external">TCP/IP(三):IP协议相关技术</a><br>4.<a href="http://www.jianshu.com/p/dc456cf57e06" target="_blank" rel="external">TCP/IP(四):TCP 与 UDP 协议简介</a><br>5.<a href="http://www.jianshu.com/p/d9edbba4035b" target="_blank" rel="external">TCP/IP(五):TCP 协议详解</a><br>6.<a href="http://www.jianshu.com/p/6e7521041e92" target="_blank" rel="external">TCP/IP(六):HTTP 与 HTTPS 简介</a><br>7.<a href="http://www.jianshu.com/p/6ecd5ae12809" target="_blank" rel="external">字符串编码入门科普</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-09-25技术周报</title>
<link href="http://baiduhidevios.github.io/2017/09/25/2017-09-25%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/09/25/2017-09-25技术周报/</id>
<published>2017-09-25T00:01:54.000Z</published>
<updated>2017-09-25T00:13:47.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.jianshu.com/p/3e4f3de18e3b" target="_blank" rel="external">关于iOS socket都在这里了</a></p>
<p>2.<a href="https://github.com/ChenYilong/iOS11AdaptationTips" target="_blank" rel="external">iOS11AdaptationTips – iOS11适配系列教程</a></p>
<p>3.<a href="http://www.jianshu.com/p/f42a33f5eb61" target="_blank" rel="external">深入理解iOS开发中的BitCode功能</a></p>
<p>4.<a href="http://www.jianshu.com/p/8471b68203e8" target="_blank" rel="external">iOS开发中WiFi相关功能总结</a></p>
<p>5.<a href="http://blog.csdn.net/u013263917/article/details/72895728" target="_blank" rel="external">iOS11开发新增功能大全</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><p>1.<a href="http://blog.csdn.net/column/details/16036.html" target="_blank" rel="external">从比较浅显的(无3D开发经验的)角度一步步介绍ARKit</a></p>
<p>2.<a href="http://blog.csdn.net/sac761/article/details/52673671" target="_blank" rel="external">OpenGL - Matrix4X4 矩阵变换</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-09-17技术周报</title>
<link href="http://baiduhidevios.github.io/2017/09/17/2017-09-17%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/09/17/2017-09-17技术周报/</id>
<published>2017-09-17T12:28:11.000Z</published>
<updated>2017-09-25T00:13:12.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Objective-C"><a href="#Objective-C" class="headerlink" title="Objective-C"></a>Objective-C</h1><p>1.<a href="http://www.cnblogs.com/beckwang0912/p/7212075.html" target="_blank" rel="external">iOS 图文并茂的带你了解深拷贝与浅拷贝</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://jeffreysambells.com/2013/01/31/generate-xcode-warnings-from-todo-comments" target="_blank" rel="external">Generate Xcode Warnings from TODO Comments</a></p>
<p>2.<a href="http://www.jianshu.com/p/3e0a399380df" target="_blank" rel="external">iOS音频掌柜– AVAudioSession</a></p>
<h1 id="Git"><a href="#Git" class="headerlink" title="Git"></a>Git</h1><p>1.<a href="https://codingstyle.cn/topics/51" target="_blank" rel="external">闯过这 54 关,点亮你的 Git 技能树</a>:推荐</p>
<p>#扩展<br>1.<a href="https://learnopengl-cn.github.io/" target="_blank" rel="external">Welcome to OpenGL</a>: 学习(和使用)现代OpenGL需要用户对图形编程以及OpenGL的幕后运作有非常高的理解才能在编程中有很好的发挥。这篇教程将告诉我们核心的图形概念,OpenGL怎样画像素到屏幕上,还有如何利用黑科技做出一些很酷的效果。</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-08-14技术周报</title>
<link href="http://baiduhidevios.github.io/2017/08/14/2017-08-14%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/08/14/2017-08-14技术周报/</id>
<published>2017-08-14T02:20:08.000Z</published>
<updated>2017-09-17T12:45:32.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><h6 id="什么是ABI?"><a href="#什么是ABI?" class="headerlink" title="什么是ABI?"></a>什么是ABI?</h6><h6 id="ABI是Application-Binary-Interface的缩写,它是一个规范,通过这个规范,所有被独立编译的二进制实体才能被链接在一起并执行"><a href="#ABI是Application-Binary-Interface的缩写,它是一个规范,通过这个规范,所有被独立编译的二进制实体才能被链接在一起并执行" class="headerlink" title="ABI是Application Binary Interface的缩写,它是一个规范,通过这个规范,所有被独立编译的二进制实体才能被链接在一起并执行"></a>ABI是Application Binary Interface的缩写,它是一个规范,通过这个规范,所有被独立编译的二进制实体才能被链接在一起并执行</h6><p>1.<a href="https://www.boxueio.com/black-board/1" target="_blank" rel="external">Swift ABI (一)</a>:</p>
<p>2.<a href="https://www.boxueio.com/black-board/2" target="_blank" rel="external">Swift ABI (二)</a></p>
<p>3.<a href="https://www.boxueio.com/black-board/5" target="_blank" rel="external">Swift ABI (三)</a></p>
<p>4.<a href="https://www.boxueio.com/black-board/12" target="_blank" rel="external">Swift ABI (完)</a></p>
<p>5.<a href="https://onevcat.com/2017/07/state-based-viewcontroller/" target="_blank" rel="external">单向数据流动的函数式 View Controller</a>:推荐</p>
<h1 id="Objective-C"><a href="#Objective-C" class="headerlink" title="Objective-C"></a>Objective-C</h1><p>1.<a href="http://www.cocoachina.com/ios/20160129/15170.html" target="_blank" rel="external">起底多线程同步锁(iOS)</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://blog.cnbang.net/tech/3386/" target="_blank" rel="external">iOS App 签名的原理</a>:推荐</p>
<h1 id="开源库"><a href="#开源库" class="headerlink" title="开源库"></a>开源库</h1><p>1.<a href="https://juejin.im/post/5987cc536fb9a03c4b374bec" target="_blank" rel="external">AsyncDisplayKit近一年的使用体会及疑难点</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky、nolol"><a href="#本期周报内容来自-DemoCooky、nolol" class="headerlink" title="本期周报内容来自: DemoCooky、nolol"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-07-23技术周报</title>
<link href="http://baiduhidevios.github.io/2017/07/23/2017-07-23%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/07/23/2017-07-23技术周报/</id>
<published>2017-07-23T08:48:03.000Z</published>
<updated>2017-07-23T09:04:15.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky"><a href="#本期周报内容来自-DemoCooky" class="headerlink" title="本期周报内容来自: DemoCooky"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="http://www.jianshu.com/p/c6ae28964ad5" target="_blank" rel="external">30天学习编写30个Swift小程序</a>:心动不如行动~写起来</p>
<h1 id="Objective-C"><a href="#Objective-C" class="headerlink" title="Objective-C"></a>Objective-C</h1><p>1.<a href="http://www.jianshu.com/p/ed2030920ec4" target="_blank" rel="external">NSMutableArray使用中忽视的问题</a>:推荐</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="https://blog.wilddog.com/?p=974" target="_blank" rel="external">移动网络下的性能优化之网络篇</a></p>
<p>2.<a href="http://www.jianshu.com/p/2cb9136c837a" target="_blank" rel="external">AFNetworking 3 批量上传图片的 3 种方法</a> </p>
<h1 id="原来还有这种操作"><a href="#原来还有这种操作" class="headerlink" title="原来还有这种操作"></a>原来还有这种操作</h1><p>1.<a href="http://www.jianshu.com/p/7d184d68b0d5" target="_blank" rel="external">你还在写for循环求和吗?</a></p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky"><a href="#本期周报内容来自-DemoCooky" class="headerlink" title="本期周报内容来自: DemoCooky"></a>本期周报内容来自: <a href="https://gith
</summary>
</entry>
<entry>
<title>2017-07-14技术周报</title>
<link href="http://baiduhidevios.github.io/2017/07/14/2017-07-14%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/07/14/2017-07-14技术周报/</id>
<published>2017-07-14T08:45:21.000Z</published>
<updated>2017-07-23T09:05:13.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-DemoCooky"><a href="#本期周报内容来自-DemoCooky" class="headerlink" title="本期周报内容来自: DemoCooky"></a>本期周报内容来自: <a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="http://www.cocoachina.com/swift/20170630/19691.html" target="_blank" rel="external">Swift 4 JSON 解析指南</a>: Apple在Swift4的 Foundation 的模块中添加了对 JSON 解析的原生支持,快来看看吧~</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.cocoachina.com/ios/20170629/19680.html" target="_blank" rel="external"> iOS 性能监控方案(上篇)</a>: 介绍了CPU 占用率、内存使用情况、FPS、冷启动、热启动时间,耗电量等基础性能指标</p>
<p>2.<a href="http://www.cocoachina.com/ios/20170630/19683.html" target="_blank" rel="external"> iOS 性能监控方案(下篇)</a> :介绍了在 iOS 中如何实现网络监控</p>
<p>3.<a href="http://www.cocoachina.com/ios/20170707/19769.html" target="_blank" rel="external">iOS多线程全套</a> :包括线程生命周期,多线程的四种解决方案,线程安全问题,GCD的使用,NSOperation的使用</p>
<h1 id="新鲜的原生库"><a href="#新鲜的原生库" class="headerlink" title="新鲜的原生库"></a>新鲜的原生库</h1><p>1.<a href="http://www.jianshu.com/p/6c2dff59eaaf" target="_blank" rel="external">Core ML 文档翻译</a> :Core ML是一个全新的机器学习基础框架</p>
<p>2.<a href="http://www.jianshu.com/p/93173062ebb4" target="_blank" rel="external">ARKit 文档翻译</a> : ARKit 将 iOS 设备的摄像头和设备动作检测 (Motion) 功能,集成到您的应用或者游戏当中,从而为用户提供增强现实体验</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-DemoCooky"><a href="#本期周报内容来自-DemoCooky" class="headerlink" title="本期周报内容来自: DemoCooky"></a>本期周报内容来自: <a href="https://gith
</summary>
</entry>
<entry>
<title>2017-06-26技术周报</title>
<link href="http://baiduhidevios.github.io/2017/06/26/2017-06-26%E6%9C%9F%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/06/26/2017-06-26期技术周报/</id>
<published>2017-06-26T12:31:07.000Z</published>
<updated>2017-07-20T02:18:38.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自: nolol、DemoCooky"></a>本期周报内容来自: <a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.qingpingshan.com/rjbc/ios/262889.html" target="_blank" rel="external"> iOS多线程读写崩溃分析</a>:【推荐】</p>
<p>2.<a href="http://www.jianshu.com/p/a84237b07611" target="_blank" rel="external"> AFNetworking之于https认证</a></p>
<p>3.<a href="http://www.jianshu.com/p/9e573607be13" target="_blank" rel="external">AFNetworking 3.0与服务端 自签名证书 https双向认证</a>:对https双向认证讲解比较详细,感兴趣的同学可以看看</p>
<h1 id="组件化"><a href="#组件化" class="headerlink" title="组件化"></a>组件化</h1><p>1.<a href="http://mp.weixin.qq.com/s/cnhuEodJGIbdodh0IxNeXQ" target="_blank" rel="external">微信终端跨平台组件 mars 系列(一) - 高性能日志模块xlog</a></p>
<p>2.<a href="http://mp.weixin.qq.com/s/PnICVDyVuMSyvpvTrdEpSQ" target="_blank" rel="external">微信终端跨平台组件 mars 系列(二) - 信令传输超时设计</a> </p>
<p>3.<a href="http://mp.weixin.qq.com/s/8FjDqPtXWWqOInsiV79Chg" target="_blank" rel="external">微信iOS SQLite源码优化实践</a></p>
<h1 id="开源"><a href="#开源" class="headerlink" title="开源"></a>开源</h1><p>1.<a href="http://www.jianshu.com/p/d75a9a8d13b5" target="_blank" rel="external">33 个 2017 年必须了解的 iOS 开源库</a> :持续更新,建议收藏哦~</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自: nolol、DemoCooky"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-05-22技术周报</title>
<link href="http://baiduhidevios.github.io/2017/05/22/2017-05-22%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/05/22/2017-05-22技术周报/</id>
<published>2017-05-22T02:54:02.000Z</published>
<updated>2017-06-26T12:57:02.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自: nolol、DemoCooky"></a>本期周报内容来自: <a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://autolayout.club/2016/12/17/JSONNeverDie-%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/" target="_blank" rel="external">JSONNeverDie 使用指南</a>:JSONNeverDie 是一个 Swift 写的 JSON 编码、解码库,利用反射实现 JSON 到 Model 的自动映射,无需任何 parse 代码,强大而简单。【推荐】</p>
<p>2.<a href="https://github.com/Artwalk/swift-style-guide/blob/master/README_CN.md" target="_blank" rel="external">swift-style-guide</a> : wift编程风格指南</p>
<h1 id="Object-C"><a href="#Object-C" class="headerlink" title="Object-C"></a>Object-C</h1><p>1.<a href="https://github.com/jiakai-lian/ThreadSafeClassDesign" target="_blank" rel="external">ThreadSafeClassDesign</a> : 线程安全【推荐】</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.cocoachina.com/ios/20170427/19135.html" target="_blank" rel="external"> 关于内存泄漏,还有哪些是你不知道的?</a>:【推荐】</p>
<p>2.<a href="http://www.cocoachina.com/ios/20170503/19168.html" target="_blank" rel="external">Lottie初级教程:打造iOS APP完美动画</a></p>
<p>3.<a href="http://www.cocoachina.com/ios/20170503/19165.html" target="_blank" rel="external">iOS进阶(一)block与property </a> </p>
<p>4.<a href="http://www.cocoachina.com/ios/20170504/19174.html" target="_blank" rel="external">iOS进阶(二)Objective-C底层原理</a></p>
<h1 id="开源"><a href="#开源" class="headerlink" title="开源"></a>开源</h1><p>1.<a href="http://www.jianshu.com/p/801519f90a37" target="_blank" rel="external">Github上关于iOS的各种开源项目集合</a> :建议收藏哦~</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-nolol、DemoCooky"><a href="#本期周报内容来自-nolol、DemoCooky" class="headerlink" title="本期周报内容来自: nolol、DemoCooky"></a>本期周报内容来自: <a
</summary>
</entry>
<entry>
<title>2017-05-07技术周报</title>
<link href="http://baiduhidevios.github.io/2017/05/07/2017-05-07%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/05/07/2017-05-07技术周报/</id>
<published>2017-05-07T09:50:56.000Z</published>
<updated>2017-05-23T07:09:11.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-eggInBlack、DemoCooky"><a href="#本期周报内容来自-eggInBlack、DemoCooky" class="headerlink" title="本期周报内容来自: eggInBlack、DemoCooky"></a>本期周报内容来自: <a href="https://github.com/orgs/BaiduHiDeviOS/people/eggInBlack" target="_blank" rel="external">eggInBlack</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="iOS–UI性能优化"><a href="#iOS–UI性能优化" class="headerlink" title="iOS–UI性能优化"></a>iOS–UI性能优化</h1><h6 id="近期组内黑蛋童鞋在搞UI优化(赞美黑蛋),本期主题以此为主"><a href="#近期组内黑蛋童鞋在搞UI优化(赞美黑蛋),本期主题以此为主" class="headerlink" title="近期组内黑蛋童鞋在搞UI优化(赞美黑蛋),本期主题以此为主 ^_^"></a>近期组内黑蛋童鞋在搞UI优化(赞美黑蛋),本期主题以此为主 ^_^</h6><p>1.<a href="http://blog.csdn.net/ggghub/article/details/49251449" target="_blank" rel="external"> iOS9中UIStackView的使用</a></p>
<p>2.<a href="http://blog.cnbang.net/tech/2578/" target="_blank" rel="external">iOS图片加载速度极限优化—FastImageCache解析</a></p>
<p>3.<a href="https://markpospesel.wordpress.com/2012/04/03/on-the-importance-of-setting-shadowpath/" target="_blank" rel="external">On the importance of setting shadowPath 关于阴影的绘制</a> </p>
<p>4.<a href="http://www.jianshu.com/p/71cba1711de0" target="_blank" rel="external">小科普:脑洞大开:为啥帧率达到 60 fps 就流畅</a>:【推荐】</p>
<p>5.<a href="http://draveness.me/layout-performance.html?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io" target="_blank" rel="external">从 Auto Layout 的布局算法谈性能</a></p>
<p>6.<a href="http://sonnewilling.com/blog/2016/10/19/iostu-xing-yuan-li-yu-chi-ping-xuan-ran/" target="_blank" rel="external">iOS图形原理与离屏渲染</a>:【推荐】</p>
<h1 id="iOS–数据缓存优化"><a href="#iOS–数据缓存优化" class="headerlink" title="iOS–数据缓存优化"></a>iOS–数据缓存优化</h1><p>1.<a href="http://blog.cnbang.net/tech/3262/" target="_blank" rel="external"> APP 缓存数据线程安全问题探讨</a>:介绍了两种解决APP缓存数据线程安全问题的方案</p>
<h1 id="博客"><a href="#博客" class="headerlink" title="博客"></a>博客</h1><p>1.<a href="http://www.cnblogs.com/lucky-star-star/p/5652447.html" target="_blank" rel="external">iOS很好的开源库</a> :一个开源库全家桶~赞美</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-eggInBlack、DemoCooky"><a href="#本期周报内容来自-eggInBlack、DemoCooky" class="headerlink" title="本期周报内容来自: eggInBlack、DemoCooky"></
</summary>
</entry>
<entry>
<title>2017-04-24技术周报</title>
<link href="http://baiduhidevios.github.io/2017/04/24/2017-04-24%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/04/24/2017-04-24技术周报/</id>
<published>2017-04-24T01:39:39.000Z</published>
<updated>2017-05-07T10:07:29.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="http://www.mrpeak.cn/blog/ios-thread-safety/" target="_blank" rel="external">深入理解 Swift 派发机制</a></p>
<p>2.<a href="http://swiftdoc.org" target="_blank" rel="external">Auto-generated documentation for Swift. Command-click no more.</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.mrpeak.cn/blog/ios-thread-safety/" target="_blank" rel="external">iOS多线程到底不安全在哪里?</a></p>
<p>2.<a href="http://www.5neo.be/understanding-ios-exception-types/" target="_blank" rel="external">Understanding iOS Exception Types</a></p>
<p>3.<a href="http://www.tuicool.com/articles/QF3mEz" target="_blank" rel="external">怎么实现一个 Airplay 服务端(盒子端) 初步讲解</a> </p>
<h1 id="工具"><a href="#工具" class="headerlink" title="工具"></a>工具</h1><p>1.<a href="https://github.com/tib/awesome-xcode-extensions" target="_blank" rel="external">awesome native xcode extensions</a> :【推荐】</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、
</summary>
</entry>
<entry>
<title>2017-4-09技术周报</title>
<link href="http://baiduhidevios.github.io/2017/04/09/2017-04-09%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/04/09/2017-04-09技术周报/</id>
<published>2017-04-09T05:36:58.000Z</published>
<updated>2017-05-07T10:07:29.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h6 id="好啦-清明过后,也该收收心继续前行了-本期内容同样精彩-速速来围观吧"><a href="#好啦-清明过后,也该收收心继续前行了-本期内容同样精彩-速速来围观吧" class="headerlink" title="好啦~清明过后,也该收收心继续前行了~本期内容同样精彩 速速来围观吧^_^"></a>好啦~清明过后,也该收收心继续前行了~本期内容同样精彩 速速来围观吧^_^</h6><h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://talk.objc.io/" target="_blank" rel="external">Swift Talk</a> :推荐一个不错的swift学习网站</p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://mp.weixin.qq.com/s/v0pffOhjFWnVbU2lXjuEmw" target="_blank" rel="external">舞动的表情包——浅析GIF格式图片的存储和压缩</a></p>
<p>2.<a href="http://mp.weixin.qq.com/s/LC4J20wVeuGW4QnBd5OeQQ" target="_blank" rel="external">iOS持续集成大比拼:Xcode Server、Jenkins、Travis和fastlane</a></p>
<p>3.<a href="http://www.jianshu.com/p/37ab0397fec7" target="_blank" rel="external">【iOS程序启动与运转】- RunLoop个人小结</a> [推荐]</p>
<p>4.<a href="http://wereadteam.github.io/2017/03/13/Signature/" target="_blank" rel="external">iOS App 签名的原理</a></p>
<h1 id="开源库"><a href="#开源库" class="headerlink" title="开源库"></a>开源库</h1><h6 id="介绍一个内存泄露检测工具:"><a href="#介绍一个内存泄露检测工具:" class="headerlink" title="介绍一个内存泄露检测工具:"></a>介绍一个内存泄露检测工具:</h6><p>1.<a href="http://wereadteam.github.io/2016/02/22/MLeaksFinder/" target="_blank" rel="external">MLeaksFinder:精准 iOS 内存泄露检测工具</a> </p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、
</summary>
</entry>
<entry>
<title>团队原创之AV Foundation-AVAudioPlayer</title>
<link href="http://baiduhidevios.github.io/2017/03/26/%E5%9B%A2%E9%98%9F%E5%8E%9F%E5%88%9B%E4%B9%8BAV%20Foundation-AVAudioPlayer/"/>
<id>http://baiduhidevios.github.io/2017/03/26/团队原创之AV Foundation-AVAudioPlayer/</id>
<published>2017-03-26T04:26:34.000Z</published>
<updated>2017-03-26T04:33:05.000Z</updated>
<content type="html"><![CDATA[<p>转自<a href="http://sunyazhou.com/" target="_blank" rel="external">東引瓯越</a> 技术博客</p>
<h2 id="开篇"><a href="#开篇" class="headerlink" title="开篇"></a>开篇</h2><p>最近在学习<code>AV Foundation</code> 试图把学习内容记录下来 并参考一些博客文章<br>本期的内容是<code>AVAudioPlayer</code></p>
<h2 id="音频知识基础"><a href="#音频知识基础" class="headerlink" title="音频知识基础 "></a>音频知识基础 </h2><blockquote>
<p>音频文件的生成过程是将声音信息<strong>采样</strong>、<strong>量化</strong>和<strong>编码</strong>产生的数字信号的过程,<strong>人耳所能听到的声音,最低的频率是从20Hz起一直到最高频率20KHZ</strong>,因此音频文件格式的最大带宽是20KHZ。根据<a href="https://zh.wikipedia.org/wiki/%E5%A5%88%E5%A5%8E%E6%96%AF%E7%89%B9%E9%A2%91%E7%8E%87" target="_blank" rel="external">奈奎斯特</a>的理论,只有采样频率高于声音信号最高频率的两倍时,才能把数字信号表示的声音还原成为原来的声音,所以音频文件的采样率一般在<strong>40~50KHZ</strong>,比如最常见的CD音质采样率<strong>44.1KHZ</strong>。 (所以一般大家都觉得CD音质是最好的.) 对声音进行采样、量化过程被称为<a href="https://zh.wikipedia.org/wiki/%E8%84%88%E8%A1%9D%E7%B7%A8%E8%99%9F%E8%AA%BF%E8%AE%8A" target="_blank" rel="external">脉冲编码调制</a>(Pulse Code Modulation),简称PCM。PCM数据是最原始的音频数据完全无损,所以PCM数据虽然音质优秀但体积庞大,为了解决这个问题先后诞生了一系列的音频格式,这些音频格式运用不同的方法对音频数据进行压缩,其中有无损压缩(ALAC、APE、FLAC)和有损压缩(MP3、AAC、OGG、WMA)两种 来源:<a href="http://msching.github.io/blog/2014/07/07/audio-in-ios/" target="_blank" rel="external">iOS音频播放 (一):概述</a> by <a href="http://msching.github.io/" target="_blank" rel="external">码农人生</a></p>
</blockquote>
<p>–</p>
<p>我觉得程寅大牛的处理音频说的很明白<br>大神列出一个经典的音频播放流程(以MP3为例)</p>
<ol>
<li>读取MP3文件</li>
<li>解析采样率、码率、时长等信息,分离MP3中的音频帧</li>
<li>对分离出来的音频帧解码得到PCM数据</li>
<li>对PCM数据进行音效处理(均衡器、混响器等,非必须)</li>
<li>把PCM数据解码成音频信号</li>
<li>把音频信号交给硬件播放</li>
<li>重复1-6步直到播放完成</li>
</ol>
<p>在iOS系统中apple对上述的流程进行了封装并提供了不同层次的接口<br><img src="https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/CoreAudioOverview/Art/core_audio_layers_2x.png" alt=""> </p>
<blockquote>
<p>这是CoreAudio的接口层次 </p>
</blockquote>
<p>下面对其中的中高层接口进行功能说明:</p>
<ul>
<li>Audio File Services:读写音频数据,可以完成播放流程中的第2步;</li>
<li>Audio File Stream Services:对音频进行解码,可以完成播放流程中的第2步;</li>
<li>Audio Converter services:音频数据转换,可以完成播放流程中的第3步;</li>
<li>Audio Processing Graph Services:音效处理模块,可以完成播放流程中的第4步;</li>
<li>Audio Unit Services:播放音频数据:可以完成播放流程中的第5步、第6步;</li>
<li>Extended Audio File Services:Audio File Services和Audio </li>
<li>Converter services的结合体;</li>
<li>AVAudioPlayer/AVPlayer(AVFoundation):高级接口,可以完成整个音频播放的过程(包括本地文件和网络流播放,第4步除外);</li>
<li>Audio Queue Services:高级接口,可以进行录音和播放,可以完成播放流程中的第3、5、6步;</li>
<li>OpenAL:用于游戏音频播放,暂不讨论</li>
</ul>
<p>可以看到apple提供的接口类型非常丰富,可以满足各种类别类需求: </p>
<ul>
<li><p>如果你只是想实现音频的播放,没有其他需求AVFoundation会很好的满足你的需求。它的接口使用简单、不用关心其中的细节;</p>
</li>
<li><p>如果你的app需要对音频进行流播放并且同时存储,那么AudioFileStreamer加AudioQueue能够帮到你,你可以先把音频数据下载到本地,一边下载一边用NSFileHandler等接口读取本地音频文件并交给AudioFileStreamer或者AudioFile解析分离音频帧,分离出来的音频帧可以送给AudioQueue进行解码和播放。如果是本地文件直接读取文件解析即可。(这两个都是比较直接的做法,这类需求也可以用AVFoundation+本地server的方式实现,AVAudioPlayer会把请求发送给本地server,由本地server转发出去,获取数据后在本地server中存储并转送给AVAudioPlayer。另一个比较trick的做法是先把音频下载到文件中,在下载到一定量的数据后把文件路径给AVAudioPlayer播放,当然这种做法在音频seek后就回有问题了。)</p>
</li>
<li>如果你正在开发一个专业的音乐播放软件,需要对音频施加音效(均衡器、混响器),那么除了数据的读取和解析以外还需要用到AudioConverter来把音频数据转换成PCM数据,再由AudioUnit+AUGraph来进行音效处理和播放(但目前多数带音效的app都是自己开发音效模块来坐PCM数据的处理,这部分功能自行开发在自定义性和扩展性上会比较强一些。PCM数据通过音效器处理完成后就可以使用AudioUnit播放了,当然AudioQueue也支持直接使对PCM数据进行播放。)。下图描述的就是使用AudioFile + AudioConverter + AudioUnit进行音频播放的流程</li>
</ul>
<p><img src="http://msching.github.io/images/iOS-audio/audioUnitPlay.jpg" alt=""></p>
<p>以上内容均转自<a href="http://msching.github.io/blog/2014/07/07/audio-in-ios/" target="_blank" rel="external">码农人生</a> 希望大神不要介意 如果有问题 我可立即清除</p>
<h2 id="使用AVAudioPlayer之前对AudioSession简介"><a href="#使用AVAudioPlayer之前对AudioSession简介" class="headerlink" title="使用AVAudioPlayer之前对AudioSession简介"></a>使用<code>AVAudioPlayer</code>之前对AudioSession简介</h2><blockquote>
<p><code>AVAudioSession</code>负责管理音频会话 它是个单例 在应用程序和操作系统之间负责中间人的角色 <a href="http://msching.github.io/blog/2014/07/08/audio-in-ios-2/" target="_blank" rel="external">AudioSession参考</a> </p>
</blockquote>
<p><code>AVAudioSession</code>主要功能包括以下几点:</p>
<ul>
<li>app是如何使用的音频服务 播放 还是录制 之类的</li>
<li>控制协调app输入输出设备(比如 麦克风,耳机、手机外放比如蓝牙连接一个外置音响 或airplay)</li>
<li>协调你的app的音频播放和系统以及其他app行为(例如有电话时需要打断,电话结束时需要恢复,按下静音按钮时是否歌曲也要静音等)</li>
</ul>
<p><img src="https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Art/aspg_intro_2x.png" alt=""></p>
<p><em>注:AVAudioSession iOS6以后使用 以前叫AudioSession__</em></p>
<h2 id="如何使用AVAudioPlayer"><a href="#如何使用AVAudioPlayer" class="headerlink" title="如何使用AVAudioPlayer"></a>如何使用<code>AVAudioPlayer</code></h2><p>在我的博客里面我尽量使用code胜过千言万语<br>使用<code>AVAudioPlayer</code>之前需要在<code>AppDelegate</code>里面导入<code>#import <AVFoundation/AVFoundation.h></code><br>并且启动音频会话</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line"></div><div class="line">- (<span class="built_in">BOOL</span>)application:(<span class="built_in">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class="built_in">NSDictionary</span> *)launchOptions {</div><div class="line"></div><div class="line"><span class="built_in">AVAudioSession</span> *session = [<span class="built_in">AVAudioSession</span> sharedInstance];</div><div class="line"><span class="built_in">NSError</span> *error;</div><div class="line"><span class="keyword">if</span> (![session setCategory:<span class="built_in">AVAudioSessionCategoryPlayback</span> error:&error]) {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"Category Error: %@"</span>, [error localizedDescription]);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">if</span> (![session setActive:<span class="literal">YES</span> error:&error]) {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"Activation Error: %@"</span>, [error localizedDescription]);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">return</span> <span class="literal">YES</span>;</div><div class="line">}</div></pre></td></tr></table></figure>
<p>上边已经介绍了<code>AVAudioSession</code> </p>
<p>这里面说一下<code>[session setCategory:AVAudioSessionCategoryPlayback error:&error]</code> 里面的<code>AVAudioSessionCategoryPlayback</code></p>
<p><img src="https://raw.githubusercontent.com/sunyazhou13/sunyazhou13.github.io-images/master/Learning%20AV%20Foundation2AVAudioPlayer/AVAudioPlayer_category.png" alt="音频会话分类"></p>
<p>这是这几种分类的列表大家可以看下</p>
<p>记得开启后台播放<br><img src="https://raw.githubusercontent.com/sunyazhou13/sunyazhou13.github.io-images/master/Learning%20AV%20Foundation2AVAudioPlayer/MacHi%202017-03-19%2022-43-36.png" alt=""><br>或者在plist里面修改<br><img src="https://raw.githubusercontent.com/sunyazhou13/sunyazhou13.github.io-images/master/Learning%20AV%20Foundation2AVAudioPlayer/MacHi%202017-03-19%2022-44-05.png" alt=""> </p>
<p>下面就是创建音频播放器代码</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="meta">#import <span class="meta-string">"ViewController.h"</span></span></div><div class="line"><span class="meta">#import <span class="meta-string"><Masonry/Masonry.h></span></span></div><div class="line"></div><div class="line"><span class="meta">#import <span class="meta-string">"THControlKnob.h"</span></span></div><div class="line"><span class="meta">#import <span class="meta-string">"THPlayButton.h"</span></span></div><div class="line"><span class="meta">#import <span class="meta-string"><AVFoundation/AVFoundation.h></span></span></div><div class="line"></div><div class="line"><span class="class"><span class="keyword">@interface</span> <span class="title">ViewController</span> ()</span></div><div class="line"></div><div class="line"><span class="comment">//三个控制推子</span></div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> THOrangeControlKnob *panKnob;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> THOrangeControlKnob *volumnKnob;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> THGreenControlKnob *rateKnob;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> THPlayButton *playButton;</div><div class="line"></div><div class="line"><span class="comment">//音乐播放器</span></div><div class="line"><span class="keyword">@property</span> (<span class="keyword">nonatomic</span>, <span class="keyword">strong</span>) <span class="built_in">AVAudioPlayer</span> *musicPlayer;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">nonatomic</span>, <span class="keyword">getter</span> = isPlaying) <span class="built_in">BOOL</span> playing; <span class="comment">//播放状态</span></div><div class="line"></div><div class="line"><span class="comment">//无关代码</span></div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> <span class="built_in">UILabel</span> *LeftRightRoundDec;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> <span class="built_in">UILabel</span> *voiceDec;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> <span class="built_in">UILabel</span> *rateDec;</div><div class="line"><span class="keyword">@property</span> (<span class="keyword">weak</span>, <span class="keyword">nonatomic</span>) <span class="keyword">IBOutlet</span> <span class="built_in">UILabel</span> *trackDescrption;</div><div class="line"></div><div class="line"><span class="keyword">@end</span></div></pre></td></tr></table></figure>
<blockquote>
<p>导入几个第三方控件的类用于音乐播放</p>
</blockquote>
<p><img src="https://raw.githubusercontent.com/sunyazhou13/sunyazhou13.github.io-images/master/Learning%20AV%20Foundation2AVAudioPlayer/MacHi%202017-03-19%2021-22-43.png" alt=""></p>
<p>这上边的三个旋钮就是导入的开源库</p>
<p>下面创建播放器<code>AVAudioPlayer</code><br>创建时需要一个<code>NSURL</code>代表要播放的文件路径 这里简单从bundle中拖了一首歌进去了</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="meta">#pragma mark -</span></div><div class="line"><span class="meta">#pragma mark - 创建AVAudioPlayer与播放状态控制</span></div><div class="line"><span class="comment">/**</span></div><div class="line">创建音乐播放器</div><div class="line"></div><div class="line">@param fileName 文件名</div><div class="line">@param fileExtension 文件扩展名</div><div class="line">@return 播放器实例</div><div class="line">*/</div><div class="line">- (<span class="built_in">AVAudioPlayer</span> *)createPlayForFile:(<span class="built_in">NSString</span> *)fileName</div><div class="line">withExtension:(<span class="built_in">NSString</span> *)fileExtension{</div><div class="line"><span class="built_in">NSURL</span> *url = [[<span class="built_in">NSBundle</span> mainBundle] URLForResource:fileName withExtension:fileExtension];</div><div class="line"><span class="built_in">NSError</span> *error = <span class="literal">nil</span>;</div><div class="line"><span class="built_in">AVAudioPlayer</span> *audioPlayer = [[<span class="built_in">AVAudioPlayer</span> alloc] initWithContentsOfURL:url error:&error];</div><div class="line"><span class="keyword">if</span> (audioPlayer) {</div><div class="line">audioPlayer.numberOfLoops = <span class="number">-1</span>; <span class="comment">//-1无限循环</span></div><div class="line">audioPlayer.enableRate = <span class="literal">YES</span>; <span class="comment">//启动倍速控制</span></div><div class="line">[audioPlayer prepareToPlay];</div><div class="line">} <span class="keyword">else</span> {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"Error creating player: %@"</span>,[error localizedDescription]);</div><div class="line">}</div><div class="line"><span class="keyword">return</span> audioPlayer;</div><div class="line">}</div></pre></td></tr></table></figure>
<p><code>numberOfLoops</code> = -1; 代表本首歌 无限循环 其它常数代表循环次数<br><code>enableRate</code> 代表是否启用倍速调节 0.5x 1.0x 2.0x 等倍速 1.0代表正常速度</p>
<p>这里说一下<code>[audioPlayer prepareToPlay]</code><br><strong>调用这个函数是为了取得需要的音频硬件并预加载<code>Audio Queue</code>的缓冲区.</strong> 当然也可以不调用这个方法直接调用 <code>[audioPlayer play]</code>,但当 <strong>调用<code>play</code>方法时也会隐性激活</strong>,调用<code>prepareToPlay</code>是为了减少 创建播放器时预设加载和听到声音输出之间的延时 </p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="class"><span class="keyword">@implementation</span> <span class="title">ViewController</span></span></div><div class="line"></div><div class="line">- (<span class="keyword">instancetype</span>)initWithNibName:(<span class="built_in">NSString</span> *)nibNameOrNil bundle:(<span class="built_in">NSBundle</span> *)nibBundleOrNil {</div><div class="line"><span class="keyword">self</span> = [<span class="keyword">super</span> initWithNibName:nibNameOrNil bundle:nibBundleOrNil];</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>) {</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.musicPlayer == <span class="literal">nil</span>) {</div><div class="line"><span class="keyword">self</span>.musicPlayer = [<span class="keyword">self</span> createPlayForFile:<span class="string">@"384551_1438267683"</span> withExtension:<span class="string">@"mp3"</span>];</div><div class="line">}</div><div class="line">[<span class="keyword">self</span> setupNotifications];</div><div class="line">}</div><div class="line"><span class="keyword">return</span> <span class="keyword">self</span>;</div><div class="line">}</div><div class="line"></div><div class="line">- (<span class="keyword">void</span>)awakeFromNib{</div><div class="line">[<span class="keyword">super</span> awakeFromNib];</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.musicPlayer == <span class="literal">nil</span>) {</div><div class="line"><span class="keyword">self</span>.musicPlayer = [<span class="keyword">self</span> createPlayForFile:<span class="string">@"384551_1438267683"</span> withExtension:<span class="string">@"mp3"</span>];</div><div class="line">}</div><div class="line">[<span class="keyword">self</span> setupNotifications];</div><div class="line"></div><div class="line">}</div></pre></td></tr></table></figure>
<blockquote>
<p>在<code>initWithNibName</code>或<code>awakeFromNib</code>时候调用一下创建播放器的代码<br>这个<code>[self setupNotifications];</code>后面说 </p>
</blockquote>
<p>先添加一些常见的方法封装 比如 <strong>播放、暂停、停止</strong><br><figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div></pre></td><td class="code"><pre><div class="line"></div><div class="line">- (<span class="keyword">void</span>)play {</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.musicPlayer == <span class="literal">nil</span>) { <span class="keyword">return</span>; }</div><div class="line"></div><div class="line"><span class="keyword">if</span> (!<span class="keyword">self</span>.playing) {</div><div class="line"><span class="built_in">NSTimeInterval</span> delayTime = [<span class="keyword">self</span>.musicPlayer deviceCurrentTime] + <span class="number">0.01</span>;</div><div class="line">[<span class="keyword">self</span>.musicPlayer playAtTime:delayTime];</div><div class="line"><span class="keyword">self</span>.playing = <span class="literal">YES</span>;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">self</span>.trackDescrption.text = [<span class="keyword">self</span>.musicPlayer.url absoluteString];</div><div class="line">[<span class="keyword">self</span> configNowPlayingInfoCenter]; <span class="comment">//配置后台播放的页面信息</span></div><div class="line">}</div><div class="line">- (<span class="keyword">void</span>)stop {</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.musicPlayer == <span class="literal">nil</span>) { <span class="keyword">return</span>; }</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.playing) {</div><div class="line">[<span class="keyword">self</span>.musicPlayer stop];</div><div class="line"><span class="keyword">self</span>.musicPlayer.currentTime = <span class="number">0.0</span>f;</div><div class="line"><span class="keyword">self</span>.playing = <span class="literal">NO</span>;</div><div class="line">}</div><div class="line">}</div><div class="line"></div><div class="line">- (<span class="keyword">void</span>)pause {</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.musicPlayer == <span class="literal">nil</span>) { <span class="keyword">return</span>; }</div><div class="line"><span class="keyword">if</span> (<span class="keyword">self</span>.playing) {</div><div class="line">[<span class="keyword">self</span>.musicPlayer pause];</div><div class="line"><span class="keyword">self</span>.playing = <span class="literal">NO</span>;</div><div class="line">}</div><div class="line">}</div></pre></td></tr></table></figure></p>
<p>这里看到<code>[self.musicPlayer deviceCurrentTime] + 0.01</code> 加了 -0.01的延时, 是为了以后大家做播放器的时候 有可能暂停或者歌曲切换时 有可能 向前向后做片段衔接, 也是为了使用 <code>playAtTime</code>去播放 指定位置的音乐用于 意外暂停或者播放上次播放的配置信息使用 这里看到我写了一个<br><code>[self configNowPlayingInfoCenter];</code>配置后台播放的页面信息<br>这个主要用于播放音乐在后台时 锁屏显示的屏幕信息 请看下面代码</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div></pre></td><td class="code"><pre><div class="line"><span class="comment">//设置锁屏状态,显示的歌曲信息</span></div><div class="line">-(<span class="keyword">void</span>)configNowPlayingInfoCenter{</div><div class="line"><span class="keyword">if</span> (<span class="built_in">NSClassFromString</span>(<span class="string">@"MPNowPlayingInfoCenter"</span>)) {</div><div class="line"><span class="built_in">NSMutableDictionary</span> *dict = [[<span class="built_in">NSMutableDictionary</span> alloc] init];</div><div class="line"></div><div class="line"><span class="comment">//歌曲名称</span></div><div class="line">[dict setObject:<span class="string">@"歌曲名称"</span> forKey:<span class="built_in">MPMediaItemPropertyTitle</span>];</div><div class="line"></div><div class="line"><span class="comment">//演唱者</span></div><div class="line">[dict setObject:<span class="string">@"演唱者"</span> forKey:<span class="built_in">MPMediaItemPropertyArtist</span>];</div><div class="line"></div><div class="line"><span class="comment">//专辑名</span></div><div class="line">[dict setObject:<span class="string">@"专辑名"</span> forKey:<span class="built_in">MPMediaItemPropertyAlbumTitle</span>];</div><div class="line"></div><div class="line"><span class="comment">//专辑缩略图</span></div><div class="line"><span class="built_in">UIImage</span> *image = [<span class="built_in">UIImage</span> imageNamed:<span class="string">@"sunyazhou"</span>];</div><div class="line"><span class="built_in">MPMediaItemArtwork</span> *artwork = [[<span class="built_in">MPMediaItemArtwork</span> alloc] initWithImage:image];</div><div class="line">[dict setObject:artwork forKey:<span class="built_in">MPMediaItemPropertyArtwork</span>];</div><div class="line"></div><div class="line"><span class="comment">//音乐剩余时长</span></div><div class="line">[dict setObject:@<span class="number">20</span> forKey:<span class="built_in">MPMediaItemPropertyPlaybackDuration</span>];</div><div class="line"></div><div class="line"><span class="comment">//音乐当前播放时间 在计时器中修改</span></div><div class="line"><span class="comment">// [dict setObject:[NSNumber numberWithDouble:100.0] forKey:MPNowPlayingInfoPropertyElapsedPlaybackTime];</span></div><div class="line"></div><div class="line"><span class="comment">//设置锁屏状态下屏幕显示播放音乐信息</span></div><div class="line">[[<span class="built_in">MPNowPlayingInfoCenter</span> defaultCenter] setNowPlayingInfo:dict];</div><div class="line">}</div><div class="line">}</div></pre></td></tr></table></figure>
<p>如果需要在计时器中不断刷新锁屏状态下的播放进度条请写如下代码</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line"><span class="comment">//计时器修改进度</span></div><div class="line">- (<span class="keyword">void</span>)changeProgress:(<span class="built_in">NSTimer</span> *)sender{</div><div class="line"><span class="keyword">if</span>(<span class="keyword">self</span>.player){</div><div class="line"><span class="comment">//当前播放时间</span></div><div class="line"><span class="built_in">NSMutableDictionary</span> *dict = [<span class="built_in">NSMutableDictionary</span> dictionaryWithDictionary:[[<span class="built_in">MPNowPlayingInfoCenter</span> defaultCenter] nowPlayingInfo]];</div><div class="line">[dict setObject:[<span class="built_in">NSNumber</span> numberWithDouble:<span class="keyword">self</span>.player.currentTime] forKey:<span class="built_in">MPNowPlayingInfoPropertyElapsedPlaybackTime</span>]; <span class="comment">//音乐当前已经过时间</span></div><div class="line">[[<span class="built_in">MPNowPlayingInfoCenter</span> defaultCenter] setNowPlayingInfo:dict];</div><div class="line"></div><div class="line">}</div><div class="line">}</div></pre></td></tr></table></figure>
<blockquote>
<p>参考<a href="http://www.iliunian.com/2831.html" target="_blank" rel="external">IOS后台运行 之 后台播放音乐</a> </p>
</blockquote>
<p>下面我们来介绍一下<br><code>[self setupNotifications];</code>注册监听 音频意外中断和耳机拔出时要暂停音乐播放<br>实现代码如下</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div></pre></td><td class="code"><pre><div class="line"><span class="comment">/**</span></div><div class="line">播放的通知处理</div><div class="line">*/</div><div class="line">- (<span class="keyword">void</span>)setupNotifications {</div><div class="line"><span class="built_in">NSNotificationCenter</span> *nsnc = [<span class="built_in">NSNotificationCenter</span> defaultCenter];</div><div class="line"></div><div class="line"><span class="comment">//添加意外中断音频播放的通知</span></div><div class="line">[nsnc addObserver:<span class="keyword">self</span></div><div class="line">selector:<span class="keyword">@selector</span>(handleInterruption:)</div><div class="line">name:<span class="built_in">AVAudioSessionInterruptionNotification</span></div><div class="line">object:[<span class="built_in">AVAudioSession</span> sharedInstance]];</div><div class="line"></div><div class="line"><span class="comment">//添加线路变化通知</span></div><div class="line">[nsnc addObserver:<span class="keyword">self</span></div><div class="line">selector:<span class="keyword">@selector</span>(hanldeRouteChange:)</div><div class="line">name:<span class="built_in">AVAudioSessionRouteChangeNotification</span></div><div class="line">object:[<span class="built_in">AVAudioSession</span> sharedInstance]];</div><div class="line">}</div></pre></td></tr></table></figure>
<p><em>注:记得在delloc里面<code>[[NSNotificationCenter defaultCenter] removeObserver:self]</code></em></p>
<p>意外中断音频发生的场景 例如 听歌过程中来电话或者 按住home键使用siri </p>
<p>下面是具体方法实现</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div></pre></td><td class="code"><pre><div class="line"><span class="comment">/**</span></div><div class="line">音频意外打断处理</div><div class="line"></div><div class="line">@param notification 通知信息</div><div class="line">*/</div><div class="line">- (<span class="keyword">void</span>)handleInterruption:(<span class="built_in">NSNotification</span> *)notification {</div><div class="line"><span class="built_in">NSDictionary</span> *info = notification.userInfo;</div><div class="line"><span class="built_in">AVAudioSessionInterruptionType</span> type = [info[<span class="built_in">AVAudioSessionInterruptionTypeKey</span>] unsignedIntegerValue];</div><div class="line"><span class="keyword">if</span> (type == <span class="built_in">AVAudioSessionInterruptionTypeBegan</span>) {</div><div class="line"><span class="comment">//Handle AVAudioSessionInterruptionTypeBegan</span></div><div class="line">[<span class="keyword">self</span> pause];</div><div class="line">} <span class="keyword">else</span> {</div><div class="line"><span class="comment">//Handle AVAudioSessionInterruptionTypeEnded</span></div><div class="line"><span class="built_in">AVAudioSessionInterruptionOptions</span> options = [info[<span class="built_in">AVAudioSessionInterruptionTypeKey</span>] unsignedIntegerValue];</div><div class="line"><span class="built_in">NSError</span> *error = <span class="literal">nil</span>;</div><div class="line"><span class="comment">//激活音频会话 允许外接音响</span></div><div class="line">[[<span class="built_in">AVAudioSession</span> sharedInstance] setCategory:<span class="built_in">AVAudioSessionCategoryPlayback</span></div><div class="line">withOptions:<span class="built_in">AVAudioSessionCategoryOptionAllowBluetooth</span> error:<span class="literal">nil</span>];</div><div class="line">[[<span class="built_in">AVAudioSession</span> sharedInstance] setActive:<span class="literal">YES</span> withOptions:<span class="built_in">AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation</span> error:&error];</div><div class="line"><span class="keyword">if</span> (options == <span class="built_in">AVAudioSessionInterruptionOptionShouldResume</span>) {</div><div class="line">[<span class="keyword">self</span> play];</div><div class="line">} <span class="keyword">else</span> {</div><div class="line">[<span class="keyword">self</span> play];</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">self</span>.playButton.selected = <span class="literal">YES</span>;</div><div class="line"></div><div class="line"><span class="keyword">if</span> (error) {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"AVAudioSessionInterruptionOptionShouldResume失败:%@"</span>,[error localizedDescription]);</div><div class="line">}</div><div class="line">}</div><div class="line">}</div></pre></td></tr></table></figure>
<p>先说<code>handleInterruption</code>意外情况下中断比如我按住home键使用siri<br>我会收到意外打断的通知当 type == <code>AVAudioSessionInterruptionTypeBegan</code>时 我们停止音乐播放或者暂停.<br>当type != <code>AVAudioSessionInterruptionTypeBegan</code>的时候一定是<code>AVAudioSessionInterruptionTypeEnded</code>这个时候<code>notification.userInfo</code>里面包含一个<code>AVAudioSessionInterruptionOptions</code>值来表明音频会话是否已经重新激活以及是否可以再次播放</p>
<p><strong><em>注:这个地方遇到个坑</em></strong> 当意外中断时候有时音频会话会很不灵敏 后来发现这种情况下需要重新激活会话 如下代码:</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">[[<span class="built_in">AVAudioSession</span> sharedInstance] setActive:<span class="literal">YES</span> withOptions:<span class="built_in">AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation</span> error:&error];</div></pre></td></tr></table></figure>
<p>这里<code>AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation</code>是为了通知其它应用会话被我激活了 很多播放器开发者很不讲究 每次从来不用这个方法导致每次别人播放完音频 自己都收不到音频重新播放的信息 建议大家以和为贵, 写良心代码.</p>
<p>因为我外接的小米蓝牙音响发现还是不好使 最后又补上了<code>AVAudioSessionCategoryOptionAllowBluetooth</code>这个 </p>
<p><strong>激活音频会话 允许外接音响</strong></p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">[[<span class="built_in">AVAudioSession</span> sharedInstance] setCategory:<span class="built_in">AVAudioSessionCategoryPlayback</span> withOptions:<span class="built_in">AVAudioSessionCategoryOptionAllowBluetooth</span> error:<span class="literal">nil</span>];</div></pre></td></tr></table></figure>
<p>就好使了</p>
<p>下面说一下耳机插拔或者USB麦克风断开 Apple有个什么<code>Human Interface Guidelines(HIG)</code>相关定义 意思是说当硬件耳机拔出时建议 暂停播放音乐或者麦克风断开时。就是处于静音状态。是为了保密播放内容不被外界听到,不管苹果啥规定 我们都得照办 否则就得被拒。</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">- (<span class="keyword">void</span>)hanldeRouteChange:(<span class="built_in">NSNotification</span> *)notification {</div><div class="line"><span class="built_in">NSDictionary</span> *info = notification.userInfo;</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReason</span> reason = [info[<span class="built_in">AVAudioSessionRouteChangeReasonKey</span>] unsignedIntegerValue];</div><div class="line"><span class="comment">//老设备不可用</span></div><div class="line"><span class="keyword">if</span> (reason == <span class="built_in">AVAudioSessionRouteChangeReasonOldDeviceUnavailable</span>) {</div><div class="line"><span class="built_in">AVAudioSessionRouteDescription</span> *previousRoute = info[<span class="built_in">AVAudioSessionRouteChangePreviousRouteKey</span>];</div><div class="line"><span class="built_in">AVAudioSessionPortDescription</span> *previousOutput = previousRoute.outputs[<span class="number">0</span>];</div><div class="line"><span class="built_in">NSString</span> *portType = previousOutput.portType;</div><div class="line"><span class="keyword">if</span> ([portType isEqualToString:<span class="built_in">AVAudioSessionPortHeadphones</span>]) {</div><div class="line">[<span class="keyword">self</span> stop];</div><div class="line"><span class="keyword">self</span>.playButton.selected = <span class="literal">NO</span>;</div><div class="line">}</div><div class="line"></div><div class="line">}</div><div class="line"></div><div class="line">}</div></pre></td></tr></table></figure>
<p>这需要用<code>AVAudioSessionRouteChangeReasonKey</code>取出线路切换的原因<code>AVAudioSessionRouteChangeReason</code> 原因有这么多</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">typedef</span> <span class="built_in">NS_ENUM</span>(<span class="built_in">NSUInteger</span>, <span class="built_in">AVAudioSessionRouteChangeReason</span>)</div><div class="line">{</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonUnknown</span> = <span class="number">0</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonNewDeviceAvailable</span> = <span class="number">1</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonOldDeviceUnavailable</span> = <span class="number">2</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonCategoryChange</span> = <span class="number">3</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonOverride</span> = <span class="number">4</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonWakeFromSleep</span> = <span class="number">6</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory</span> = <span class="number">7</span>,</div><div class="line"><span class="built_in">AVAudioSessionRouteChangeReasonRouteConfigurationChange</span> <span class="built_in">NS_ENUM_AVAILABLE_IOS</span>(<span class="number">7</span>_0) = <span class="number">8</span></div><div class="line">} <span class="built_in">NS_AVAILABLE_IOS</span>(<span class="number">6</span>_0);</div></pre></td></tr></table></figure>
<p>我们需要这个<code>AVAudioSessionRouteChangeReasonOldDeviceUnavailable</code> 判断是否是旧设备<br>通过<code>AVAudioSessionRouteChangePreviousRouteKey</code>拿出</p>
<p><code>AVAudioSessionRouteDescription</code>描述信息<br><code>previousRoute</code> 在通过<br><code>previousRoute.outputs[0]</code>拿出<code>AVAudioSessionPortDescription</code></p>
<p>拿出<code>NSString *portType = previousOutput.portType</code></p>
<p>如果<code>[portType isEqualToString:AVAudioSessionPortHeadphones]</code></p>
<p>如果是耳机<code>AVAudioSessionPortHeadphones</code>则暂停播放</p>
<p>以上就是中断和线路切换的一些代码逻辑</p>
<p>下面我介绍一些好玩的</p>
<p><img src="https://raw.githubusercontent.com/sunyazhou13/sunyazhou13.github.io-images/master/Learning%20AV%20Foundation2AVAudioPlayer/IMG_2090.PNG" alt=""></p>
<p>前面说的一些后台设置信息显示的内容就是上图所示 在锁屏的时候显示</p>
<p>但是大家一定很奇怪的是怎么实现接收 <strong>锁屏状态下 点击 上一曲 暂停/播放 下一曲等操作</strong></p>
<p>需要在AppDelegate里面写上</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">- (<span class="built_in">BOOL</span>)application:(<span class="built_in">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class="built_in">NSDictionary</span> *)launchOptions {</div><div class="line"></div><div class="line"><span class="built_in">AVAudioSession</span> *session = [<span class="built_in">AVAudioSession</span> sharedInstance];</div><div class="line"><span class="built_in">NSError</span> *error;</div><div class="line"><span class="keyword">if</span> (![session setCategory:<span class="built_in">AVAudioSessionCategoryPlayback</span> error:&error]) {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"Category Error: %@"</span>, [error localizedDescription]);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keyword">if</span> (![session setActive:<span class="literal">YES</span> error:&error]) {</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"Activation Error: %@"</span>, [error localizedDescription]);</div><div class="line">}</div><div class="line"></div><div class="line">[[<span class="built_in">UIApplication</span> sharedApplication] beginReceivingRemoteControlEvents];</div><div class="line">[<span class="keyword">self</span> becomeFirstResponder];</div><div class="line"><span class="keyword">return</span> <span class="literal">YES</span>;</div><div class="line">}</div></pre></td></tr></table></figure>
<p>这<code>[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];</code><br>行代码 以及调用自己为 <code>[self becomeFirstResponder];</code>第一响应者 这样写是为了应用响应音频播放 后台切换或者中断的时候更灵敏.</p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">- (<span class="built_in">BOOL</span>)canBecomeFirstResponder {</div><div class="line"><span class="keyword">return</span> <span class="literal">YES</span>;</div><div class="line">}</div></pre></td></tr></table></figure>
<p>然后 写上如下代码 处理<strong>锁屏状态下 点击 上一曲 暂停/播放 下一曲等操作</strong></p>
<figure class="highlight objc"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div></pre></td><td class="code"><pre><div class="line">- (<span class="keyword">void</span>)remoteControlReceivedWithEvent:(<span class="built_in">UIEvent</span> *)event {</div><div class="line"><span class="keyword">if</span> (event.type == <span class="built_in">UIEventTypeRemoteControl</span>) {</div><div class="line"><span class="keyword">switch</span> (event.subtype) {</div><div class="line"><span class="keyword">case</span> <span class="built_in">UIEventSubtypeRemoteControlPlay</span>:</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"暂停播放"</span>);</div><div class="line"><span class="keyword">break</span>;</div><div class="line"><span class="keyword">case</span> <span class="built_in">UIEventSubtypeRemoteControlPause</span>:</div><div class="line"></div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"继续播放"</span>);</div><div class="line"><span class="keyword">break</span>;</div><div class="line"><span class="keyword">case</span> <span class="built_in">UIEventSubtypeRemoteControlNextTrack</span>:</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"下一曲"</span>);</div><div class="line"><span class="keyword">break</span>;</div><div class="line"><span class="keyword">case</span> <span class="built_in">UIEventSubtypeRemoteControlPreviousTrack</span>:</div><div class="line"><span class="built_in">NSLog</span>(<span class="string">@"上一曲"</span>);</div><div class="line"><span class="keyword">break</span>;</div><div class="line"><span class="keyword">default</span>:</div><div class="line"><span class="keyword">break</span>;</div><div class="line">}</div><div class="line">}</div><div class="line">}</div></pre></td></tr></table></figure>
<p>剩余逻辑大家自己填充吧我就不介绍了. </p>
<p>好了AVAudioPlayer就到这吧!有啥疑问大家可以评论留言都能看到或者指正我的错误。我会及时改正.</p>
<p>全文完</p>
<p><strong>文章的最终<a href="https://github.com/sunyazhou13/AVAudioPlayerDemo" target="_blank" rel="external">demo</a></strong></p>
]]></content>
<summary type="html">
<p>转自<a href="http://sunyazhou.com/" target="_blank" rel="external">東引瓯越</a> 技术博客</p>
<h2 id="开篇"><a href="#开篇" class="headerlink" title="开篇
</summary>
</entry>
<entry>
<title>2017-03-26技术周报</title>
<link href="http://baiduhidevios.github.io/2017/03/26/2017-03-26%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/03/26/2017-03-26技术周报/</id>
<published>2017-03-26T02:56:20.000Z</published>
<updated>2017-04-09T06:02:16.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-孙亚洲、GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-孙亚洲、GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: 孙亚洲、GlareCH、DemoCooky、nolol"></a>本期周报内容来自: <a href="http://sunyazhou.com/" target="_blank" rel="external">孙亚洲</a>、<a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://www.raywenderlich.com/150015/callkit-tutorial-ios" target="_blank" rel="external">CallKit 之旅</a> :swift CallKit 之旅</p>
<p>2.<a href="http://mp.weixin.qq.com/s/WPXzYQrw1bihLNjjPmIKwA" target="_blank" rel="external">简单点,理解iOS与函数式编程</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><h6 id="本期iOS相关主要集中介绍一下AV-Foundation框架,并附上团队同学孙亚洲的一篇原创博客(感谢-),没错,就是上一篇-希望对你有所帮助!"><a href="#本期iOS相关主要集中介绍一下AV-Foundation框架,并附上团队同学孙亚洲的一篇原创博客(感谢-),没错,就是上一篇-希望对你有所帮助!" class="headerlink" title="本期iOS相关主要集中介绍一下AV Foundation框架,并附上团队同学孙亚洲的一篇原创博客(感谢~~),没错,就是上一篇~ 希望对你有所帮助!"></a>本期iOS相关主要集中介绍一下AV Foundation框架,并附上团队同学<a href="http://sunyazhou.com/" target="_blank" rel="external">孙亚洲</a>的一篇原创博客(感谢~~),没错,就是上一篇~ 希望对你有所帮助!</h6><h1 id="开源库"><a href="#开源库" class="headerlink" title="开源库"></a>开源库</h1><h6 id="介绍两个Swfit中管理资源的开源库:"><a href="#介绍两个Swfit中管理资源的开源库:" class="headerlink" title="介绍两个Swfit中管理资源的开源库:"></a>介绍两个Swfit中管理资源的开源库:</h6><p>1.<a href="https://github.com/mac-cain13/R.swift" target="_blank" rel="external">R.swift</a> : 在Swift中更安全、方便的使用各类资源</p>
<p>2.<a href="https://github.com/SwiftGen/SwiftGen" target="_blank" rel="external">SwiftGen</a>: SwiftGen是一个为你的项目资源自动生成代码的工具</p>
<p>3.<a href="https://github.com/ReactKit/SwiftTask" target="_blank" rel="external">SwiftTask</a>: Promise + progress + pause + cancel + retry for Swift.</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-孙亚洲、GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-孙亚洲、GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: 孙亚洲、GlareC
</summary>
</entry>
<entry>
<title>2017-03-18技术周报</title>
<link href="http://baiduhidevios.github.io/2017/03/18/2017-03-18%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/03/18/2017-03-18技术周报/</id>
<published>2017-03-18T09:32:12.000Z</published>
<updated>2017-03-18T10:34:17.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、nolol"></a>本期周报内容来自: <a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift"><a href="#Swift" class="headerlink" title="Swift"></a>Swift</h1><p>1.<a href="https://github.com/zixun/GodEye/blob/master/README.md" target="_blank" rel="external">GodEye:基于Swift的日志监控系统</a> :GodEye是一款基于Swift的功能强大的监控开源库,笔者在文末也推荐了自己写的一本书<a href="https://www.qingdan.us/product/25" target="_blank" rel="external">《iOS监控编程》</a>,想深入了解监控方向的童鞋可以尝试。</p>
<p>2.<a href="http://www.appcoda.com/grand-central-dispatch/" target="_blank" rel="external">Swift 3使用GCD和DispatchQueues</a> —><a href="http://www.cocoachina.com/swift/20170223/18749.html" target="_blank" rel="external">翻译版戳我</a></p>
<h1 id="iOS"><a href="#iOS" class="headerlink" title="iOS"></a>iOS</h1><p>1.<a href="http://www.cocoanetics.com/2011/10/avoiding-image-decompression-sickness/" target="_blank" rel="external"> iOS中如何避免图像解压缩的时间开销</a> —><a href="http://blog.csdn.net/tiantian1980/article/details/8854739" target="_blank" rel="external">翻译版戳我</a></p>
<p>2.<a href="http://www.cocoachina.com/ios/20161205/18279.html" target="_blank" rel="external">正确使用@synchronized()</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><h6 id="本期扩展内容主要涉足算法领域,看完后智商-2-手动滑稽"><a href="#本期扩展内容主要涉足算法领域,看完后智商-2-手动滑稽" class="headerlink" title="本期扩展内容主要涉足算法领域,看完后智商+2[手动滑稽]"></a>本期扩展内容主要涉足算法领域,看完后智商+2[手动滑稽]</h6><p>1.<a href="http://yanyiwu.com/work/2014/01/30/simhash-shi-xian-xiang-jie.html" target="_blank" rel="external">simhash算法,计算文本相似度</a> </p>
<p>2.<a href="http://mp.weixin.qq.com/s/mVFBUUz0f1dSyouOVv7g3Q" target="_blank" rel="external">深度学习在美团点评的应用</a></p>
<p>3.<a href="http://hugnew.com/?p=814" target="_blank" rel="external">浅谈指数退避算法</a>:退避算法就是网络上的节点在发送数据冲突后,等待一定时间后再发,等待时间是随指数增长,从而避免频繁的触发冲突.</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-GlareCH、DemoCooky、nolol"><a href="#本期周报内容来自-GlareCH、DemoCooky、nolol" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、
</summary>
</entry>
<entry>
<title>2017-03-11技术周报</title>
<link href="http://baiduhidevios.github.io/2017/03/11/2017-03-11%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/03/11/2017-03-11技术周报/</id>
<published>2017-03-11T10:23:02.000Z</published>
<updated>2017-03-11T10:26:22.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-GlareCH、DemoCooky、happyapper、nolol、jenglev"><a href="#本期周报内容来自-GlareCH、DemoCooky、happyapper、nolol、jenglev" class="headerlink" title="本期周报内容来自: GlareCH、DemoCooky、happyapper、nolol、jenglev"></a>本期周报内容来自: <a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a>、<a href="https://github.com/happyapper" target="_blank" rel="external">happyapper</a>、<a href="https://github.com/nolol" target="_blank" rel="external">nolol</a>、<a href="https://github.com/jenglev" target="_blank" rel="external">jenglev</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="关于Swift"><a href="#关于Swift" class="headerlink" title="关于Swift"></a>关于Swift</h1><p>1.<a href="https://segmentfault.com/p/1210000008580163/read" target="_blank" rel="external">无论你是否主力 Swift, 这些事情你都可以了解一下</a> :聊一聊关于Swift 能不能取代 Objective-C</p>
<p>2.<a href="https://github.com/raywenderlich/swift-style-guide" target="_blank" rel="external">The Official raywenderlich.com Swift Style Guide</a> : 更具有风格的Swift3 指南【推荐】</p>
<h1 id="iOS–实战"><a href="#iOS–实战" class="headerlink" title="iOS–实战"></a>iOS–实战</h1><p>1.[Swift] <a href="http://www.jianshu.com/p/454b06590cf1?utm_campaign=maleskine&utm_content=note&utm_medium=reader_share&utm_source=weibo&url_type=39&object_type=webpage&pos=1" target="_blank" rel="external">导航栏的平滑显示和隐藏</a> 【推荐】</p>
<p>2.[Object-C] <a href="http://www.cocoachina.com/ios/20170208/18651.html" target="_blank" rel="external">今日头条iOS客户端启动速度优化</a></p>
<h1 id="单测"><a href="#单测" class="headerlink" title="单测"></a>单测</h1><p>1.<a href="http://draveness.me/http-mock/" target="_blank" rel="external">如何进行 HTTP Mock</a>:HTTP Mock 在测试中非常好用,我们可以在不需要后端 API 的情况下,在本地对 HTTP 请求进行拦截,返回想要的 json 数据,而 OHHTTPStubs 就为我们提供了这样一种解决方案。【推荐】</p>
<h1 id="源码"><a href="#源码" class="headerlink" title="源码"></a>源码</h1><p>1.<a href="http://www.swiftytime.com/" target="_blank" rel="external">Swifty Time</a> : 一个收录了大量swift优秀源码的网站 【推荐】</p>
<p>2.<a href="http://www.cnblogs.com/ludashi/p/5556088.html" target="_blank" rel="external">iOS开发之Alamofire源码解析前奏–NSURLSession全家桶</a></p>
<h1 id="扩展"><a href="#扩展" class="headerlink" title="扩展"></a>扩展</h1><p>1.<a href="http://www.oschina.net/news/77135/quic-google-protocol-web-platform-from-tcp-to-udp" target="_blank" rel="external">Google QUIC 协议:从 TCP 到 UDP 的 Web 平台</a> :QUIC(Quick UDP Internet Connections)协议是一种全新的基于UDP的web开发协议,开创性的使用了UDP协议作为底层传输协议,通过各种方式减少了网络延迟。</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-GlareCH、DemoCooky、happyapper、nolol、jenglev"><a href="#本期周报内容来自-GlareCH、DemoCooky、happyapper、nolol、jenglev" class="headerlin
</summary>
</entry>
<entry>
<title>2017-03-03技术周报</title>
<link href="http://baiduhidevios.github.io/2017/03/03/2017-03-03%E6%8A%80%E6%9C%AF%E5%91%A8%E6%8A%A5/"/>
<id>http://baiduhidevios.github.io/2017/03/03/2017-03-03技术周报/</id>
<published>2017-03-03T13:22:31.000Z</published>
<updated>2017-03-03T13:26:23.000Z</updated>
<content type="html"><![CDATA[<h6 id="本期周报内容来自-eggInBlack、GlareCH、DemoCooky"><a href="#本期周报内容来自-eggInBlack、GlareCH、DemoCooky" class="headerlink" title="本期周报内容来自: eggInBlack、GlareCH、DemoCooky"></a>本期周报内容来自: <a href="https://github.com/orgs/BaiduHiDeviOS/people/eggInBlack" target="_blank" rel="external">eggInBlack</a>、<a href="https://github.com/glarech" target="_blank" rel="external">GlareCH</a>、<a href="https://github.com/DemoCooky" target="_blank" rel="external">DemoCooky</a></h6><p>时光机:<a href="https://github.com/BaiduHiDeviOS/iOS-Tech-Weekly" target="_blank" rel="external">周报汇总</a>、<a href="http://baiduhidevios.github.io/">周报博客</a>、<a href="https://github.com/BaiduHiDeviOS/iOS-puzzles" target="_blank" rel="external">iOS puzzles</a></p>
<hr>
<h1 id="Swift–基础"><a href="#Swift–基础" class="headerlink" title="Swift–基础"></a>Swift–基础</h1><p>1.<a href="https://onevcat.com/2017/02/ownership/" target="_blank" rel="external">所有权宣言 - Swift 官方文章 Ownership Manifesto 译文评注版</a></p>
<p>2.<a href="http://nightfade.me/post/tech/2015-08-28-notes-on-using-swift-with-cocoa-and-objective-c" target="_blank" rel="external">《USING SWIFT WITH COCOA AND OBJECTIVE-C》学习笔记</a></p>
<h1 id="Swift–实战"><a href="#Swift–实战" class="headerlink" title="Swift–实战"></a>Swift–实战</h1><p>1.<a href="http://www.appcoda.com/javascriptcore-swift/" target="_blank" rel="external">在Swift项目中使用JavaScript</a> [推荐]</p>
<p>2.<a href="https://videos.raywenderlich.com/screencasts/server-side-swift-with-vapor-authentication-with-turnstile" target="_blank" rel="external">Server Side Swift with Vapor: Authentication with Turnstile</a> :视频讲解了如何通过Swift的Vapor来实现一个基于Turnstile库的登录和授权功能[推荐]</p>
<p>3.<a href="http://www.jianshu.com/p/5ff2ba2192a7" target="_blank" rel="external">Swift 后台开发</a> :对于swift后台开发不太了解的同学,可以先参考这篇文章</p>
<h1 id="编译原理"><a href="#编译原理" class="headerlink" title="编译原理"></a>编译原理</h1><p>1.<a href="http://awhisper.github.io/2017/02/26/%E6%89%AF%E6%B7%A1%EF%BC%9A%E5%A4%A7%E7%99%BD%E8%AF%9D%E8%81%8A%E8%81%8A%E7%BC%96%E8%AF%91%E9%82%A3%E7%82%B9%E4%BA%8B%E5%84%BF/" target="_blank" rel="external">大白话聊聊编译那点事儿</a></p>
<h1 id="源码"><a href="#源码" class="headerlink" title="源码"></a>源码</h1><p>1.<a href="https://github.com/Draveness/iOS-Source-Code-Analyze" target="_blank" rel="external">关于iOS开源框架源代码解析的文章</a>:详解了一些优秀的开源库,作者会不断更新,建议收藏[推荐]</p>
]]></content>
<summary type="html">
<h6 id="本期周报内容来自-eggInBlack、GlareCH、DemoCooky"><a href="#本期周报内容来自-eggInBlack、GlareCH、DemoCooky" class="headerlink" title="本期周报内容来自: eggInBla
</summary>
</entry>
</feed>