/
index.html
454 lines (321 loc) · 18.4 KB
/
index.html
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
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>iOS移动开发周报-第11期 | 唐巧的博客</title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta name="author" content="唐巧">
<meta name="description" content="版权说明本文为 InfoQ 中文站特供稿件,首发地址为:文章链接。如需转载,请与 InfoQ 中文站联系。 前言欢迎国内的iOS同行或技术作者向我提交周报线索,线索可以是新闻、教程、开发工具或开源项目,将相关文章的简介和链接在微博上发布并 @唐巧_boy 即可。 【摘要】:本期iOS移动开发周报带来如下内容:iOS应用安全开发概述,Collection View 动画,可变参数列表的实现原理,Xc">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS移动开发周报-第11期">
<meta property="og:url" content="https://blog.devtang.com/2014/05/16/ios-weekly-11/index.html">
<meta property="og:site_name" content="唐巧的博客">
<meta property="og:description" content="版权说明本文为 InfoQ 中文站特供稿件,首发地址为:文章链接。如需转载,请与 InfoQ 中文站联系。 前言欢迎国内的iOS同行或技术作者向我提交周报线索,线索可以是新闻、教程、开发工具或开源项目,将相关文章的简介和链接在微博上发布并 @唐巧_boy 即可。 【摘要】:本期iOS移动开发周报带来如下内容:iOS应用安全开发概述,Collection View 动画,可变参数列表的实现原理,Xc">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2014-05-16T05:36:16.000Z">
<meta property="article:modified_time" content="2020-02-08T18:08:22.161Z">
<meta property="article:author" content="唐巧">
<meta property="article:tag" content="iOS">
<meta property="article:tag" content="唐巧">
<meta property="article:tag" content="猿辅导">
<meta property="article:tag" content="开发">
<meta name="twitter:card" content="summary">
<link rel="alternative" href="/atom.xml" title="唐巧的博客" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/%02.css">
<link rel="stylesheet" href="/.css">
<meta name="generator" content="Hexo 4.2.0"></head>
<body>
<header>
<div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="唐巧的博客">唐巧的博客</a></h1>
<h2 class="blog-motto">记录下自己学习的点滴</h2>
</div>
<div class="navbar"><a class="navbutton navmobile" href="#" title="菜单">
</a></div>
<nav class="animated">
<ul>
<ul>
<li><a href="/">首页</a></li>
<li><a href="/archives">归档</a></li>
<li><a href="/about">关于</a></li>
<li>
<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
<label>Search</label>
<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
<input type="hidden" name="q" value="site:blog.devtang.com">
</form>
</li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div id="main" class="post" itemscope itemprop="blogPost">
<article itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/2014/05/16/ios-weekly-11/" title="iOS移动开发周报-第11期" itemprop="url">iOS移动开发周报-第11期</a>
</h1>
<p class="article-time">
<time datetime="2014-05-16T05:36:16.000Z" itemprop="datePublished"> 发表于 2014-05-16 05:36</time>
</p>
</header>
<div class="article-content">
<div id="toc" class="toc-article">
<strong class="toc-title">文章目录</strong>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#版权说明"><span class="toc-number">1.</span> <span class="toc-text">版权说明</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#前言"><span class="toc-number">1.1.</span> <span class="toc-text">前言</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#教程"><span class="toc-number">2.</span> <span class="toc-text">教程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#工具"><span class="toc-number">3.</span> <span class="toc-text">工具</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#开源项目"><span class="toc-number">4.</span> <span class="toc-text">开源项目</span></a></li></ol>
</div>
<h2 id="版权说明"><a href="#版权说明" class="headerlink" title="版权说明"></a>版权说明</h2><p>本文为 InfoQ 中文站特供稿件,首发地址为:<a href="http://www.infoq.com/cn/news/2014/05/ios-app-security-development" target="_blank" rel="noopener">文章链接</a>。如需转载,请与 InfoQ 中文站联系。</p>
<h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>欢迎国内的iOS同行或技术作者向我提交周报线索,线索可以是新闻、教程、开发工具或开源项目,将相关文章的简介和链接在微博上发布并 <a href="http://weibo.com/tangqiaoboy" target="_blank" rel="noopener">@唐巧_boy</a> 即可。</p>
<p>【摘要】:本期iOS移动开发周报带来如下内容:iOS应用安全开发概述,Collection View 动画,可变参数列表的实现原理,XcodeBoost插件等。</p>
<h2 id="教程"><a href="#教程" class="headerlink" title="教程"></a>教程</h2><ol>
<li><p><a href="http://www.csdn.net/article/2014-04-30/2819573-The-Secret-Of-App-Dev-Security" target="_blank" rel="noopener">《iOS应用安全开发,你不知道的那些事》</a>:iOS应用由于其直接运行在手机上,相比运行在服务器的后台服务,更有可能被黑客攻击。本文从网络安全、本地文件和数据安全、源代码安全三个方面,阐述iOS应用在安全性上遇到的挑战。</p>
</li>
<li><p><a href="http://objccn.io/issue-12-5/" target="_blank" rel="noopener">《Collection View 动画》</a>:<code>UICollectionView</code> 和相关类的设置非常灵活和强大。但是灵活性一旦增强,某种程度上也增加了其复杂性: <code>UICollectionView</code> 比老式的 <code>UITableView</code> 更有深度,适用性也更强。本文的第一部分将集中讨论并举例说明如何用不同的类和方法来共同帮助实现一些常见的 <code>UICollectionView</code> 动画。在第二部分,我们将看一下带有 collection views 的 view controller 转场动画以及在 <code>useLayoutToLayoutNavigationTransitions</code> 可用时使用其进行转场,如果不可用时,我们会实现一个自定义转场动画。</p>
</li>
<li><p><a href="http://gracelancy.com/blog/2014/05/05/variable-argument-lists/" target="_blank" rel="noopener">《Variable Argument Lists》</a>:可变参数函数(Variadic Function),即是指一个可以接受可变数量的参数的函数。在C语言中,对该特性的支持,即是通过可变参数列表(Variable Argument list)来实现的。本文讨论了其具体的实现内部原理。最后作者<a href="http://weibo.com/lancy1014" target="_blank" rel="noopener">晨钰Lancy</a>介绍了其开源的一个能够接收block作为回调的自定义的<a href="https://github.com/lancy/cyalertview" target="_blank" rel="noopener">AlertView组件</a>。</p>
</li>
<li><p><a href="http://imoldman.github.io/blog/2014/04/30/why-assert-enabled-under-release-in-xcode/" target="_blank" rel="noopener">《assert出问题了》</a>:作者分享了在Xcode中使用Assert时需要注意的问题。</p>
</li>
<li><p><a href="http://stackoverflow.com/questions/7385439/exception-thrown-in-nsorderedset-generated-accessors" target="_blank" rel="noopener">《CoreData的坑》</a>:<a href="http://weibo.com/pinxue" target="_blank" rel="noopener">pinxue</a>分享了一个持续3年都没有修复的CoreData的Bug。</p>
</li>
<li><p><a href="http://www.taofengping.com/2014/05/07/multi-similar-application/#.U3N25q2SyrJ" target="_blank" rel="noopener">《使用cocoapods创建多个类似工程的尝试》</a>:因为业务的需要,作者做了一批类似无聊图的App,应用本身没有复杂的逻辑,所有类“无聊图”的应用都针对特定的用户群,设计了不同界面风格的,比如适合宅男的女神应用,适合吃货的美食应用等等诸如此类,大概一共七八个。作者介绍了其使用cocoapods创建多个类似工程的尝试。</p>
</li>
<li><p><a href="http://miao.hu/2012/02/26/osx-exp-share/" target="_blank" rel="noopener">《Mac 软件和学习经验分享》</a>:作者介绍了一些优秀的 Mac 软件和学习Mac的经验。</p>
</li>
<li><p><a href="http://subjc.com/" target="_blank" rel="noopener">subjc.com</a>:subjc.com是一个介绍iOS界面编程技巧的网站。网站中有动画实例分析以及实现的代码。</p>
</li>
</ol>
<h2 id="工具"><a href="#工具" class="headerlink" title="工具"></a>工具</h2><ol>
<li><p><a href="https://github.com/fortinmike/XcodeBoost" target="_blank" rel="noopener">XcodeBoost</a>:XcodeBoost包含多个辅助修改代码的小功能,比如:</p>
<ol>
<li>可以在.m文件中复制方法实现,然后将该方法的定义粘贴到对应的.h文件中<ol start="2">
<li>可以在某一个源文件中直接输入正则表达式查找</li>
<li>可以复制粘贴代码时不启用Xcode的自动缩进功能(Xcode的自动缩进经常出问题,造成已经调整好的代码缩进,因为粘贴时被Xcode调整坏了)</li>
</ol>
</li>
</ol>
</li>
</ol>
<h2 id="开源项目"><a href="#开源项目" class="headerlink" title="开源项目"></a>开源项目</h2><ol>
<li><p><a href="https://github.com/monoclesociety/eggscellent" target="_blank" rel="noopener">Eggscellent开源</a>:Eggscellent是Mac上的开源的番茄钟应用。</p>
</li>
<li><p><a href="https://github.com/viewfinderco/viewfinder" target="_blank" rel="noopener">Viewfinder</a>:移动支付公司 Square 将去年收购的照片应用 Viewfinder 开源了,包含服务端、iOS 和 Android 应用代码。<a href="http://corner.squareup.com/2014/05/open-sourcing-viewfinder.html" target="_blank" rel="noopener">这里</a>有该项目的介绍。</p>
</li>
<li><p><a href="https://github.com/kevinzhow/PNChart" target="_blank" rel="noopener">PNChart</a>:作者<a href="http://weibo.com/kevinzhow" target="_blank" rel="noopener">周楷雯Kevin</a>发布了PNChart 0.5版本,提供了一个更漂亮的Pie Chart界面。</p>
</li>
<li><p><a href="https://atom.io/" target="_blank" rel="noopener">文本编辑器Atom开源</a>:GitHub将其开发的文本编辑器Atom开源。</p>
</li>
</ol>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<a class="article-category-link" href="/categories/iOS-weekly/">iOS weekly</a>
</div>
</div>
<div class="article-share" id="share">
<div data-url="https://blog.devtang.com/2014/05/16/ios-weekly-11/" data-title="iOS移动开发周报-第11期 | 唐巧的博客" data-tsina="" class="share clearfix">
</div>
</div>
</footer>
</article>
<nav class="article-nav clearfix">
<div class="prev" >
<a href="/2014/05/23/ios-weekly-12/" title="iOS移动开发周报-第12期">
<strong>上一篇:</strong><br/>
<span>
iOS移动开发周报-第12期</span>
</a>
</div>
<div class="next">
<a href="/2014/05/08/ios-security-dev-overview/" title="iOS应用安全开发概述">
<strong>下一篇:</strong><br/>
<span>iOS应用安全开发概述
</span>
</a>
</div>
</nav>
</div>
<div class="openaside"><a class="navbutton" href="#" title="显示侧边栏"></a></div>
<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隐藏侧边栏"></a></div>
<aside class="clearfix">
<div class="sponsor">
</div>
<div class="categorieslist">
<p class="asidetitle">分类</p>
<ul>
<li><a href="/categories/books-summary/" title="books summary">books summary</a></li>
<li><a href="/categories/iOS/" title="iOS">iOS</a></li>
<li><a href="/categories/iOS-weekly/" title="iOS weekly">iOS weekly</a></li>
<li><a href="/categories/mac/" title="mac">mac</a></li>
<li><a href="/categories/shell/" title="shell">shell</a></li>
<li><a href="/categories/summary/" title="summary">summary</a></li>
</ul>
</div>
<div class="weixin">
<br />
<p class="asidetitle">微信公众号</p>
<p>关注我的微信公众号,和我一起成长:</p>
<img src="/images/weixin-qr.jpg" width="230px" />
</div>
<div class="rsspart">
<a href="/atom.xml" target="_blank" title="rss">RSS 订阅</a>
</div>
</aside>
</div>
</div>
<footer><div id="footer" >
<div class="social-font" class="clearfix">
</div>
<p class="copyright" style="margin-top: 10px;">
Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2020
<a href="/about" target="_blank" title="唐巧">唐巧</a>
</p>
</div>
</footer>
<script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.navbar').click(function(){
$('header nav').toggleClass('shownav');
});
var myWidth = 0;
function getSize(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
};
var m = $('#main'),
a = $('#asidepart'),
c = $('.closeaside'),
o = $('.openaside');
c.click(function(){
a.addClass('fadeOut').css('display', 'none');
o.css('display', 'block').addClass('fadeIn');
m.addClass('moveMain');
});
o.click(function(){
o.css('display', 'none').removeClass('beforeFadeIn');
a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');
m.removeClass('moveMain');
});
$(window).scroll(function(){
o.css("top",Math.max(80,260-$(this).scrollTop()));
});
$(window).resize(function(){
getSize();
if (myWidth >= 1024) {
$('header nav').removeClass('shownav');
}else{
m.removeClass('moveMain');
a.css('display', 'block').removeClass('fadeOut');
o.css('display', 'none');
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var ai = $('.article-content>iframe'),
ae = $('.article-content>embed'),
t = $('#toc'),
ta = $('#toc.toc-aside'),
o = $('.openaside'),
c = $('.closeaside');
if(ai.length>0){
ai.wrap('<div class="video-container" />');
};
if(ae.length>0){
ae.wrap('<div class="video-container" />');
};
c.click(function(){
ta.css('display', 'block').addClass('fadeIn');
});
o.click(function(){
ta.css('display', 'none');
});
$(window).scroll(function(){
ta.css("top",Math.max(140,320-$(this).scrollTop()));
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var $this = $('.share'),
url = $this.attr('data-url'),
encodedUrl = encodeURIComponent(url),
title = $this.attr('data-title'),
tsina = $this.attr('data-tsina'),
description = $this.attr('description');
var html = [
'<div class="hoverqrcode clearfix"></div>',
'<a class="overlay" id="qrcode"></a>',
'<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
'<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
'<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
'<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
'<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
'<span title="Share to"></span>'
].join('');
$this.append(html);
$('.hoverqrcode').hide();
var myWidth = 0;
function updatehoverqrcode(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
var qrsize = myWidth > 1024 ? 200:100;
var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
var p = $('.article-share-qrcode').position();
$('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
.css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
.qrcode(options);
};
$(window).resize(function(){
$('.hoverqrcode').hide();
});
$('.article-share-qrcode').click(function(){
updatehoverqrcode();
$('.hoverqrcode').toggle();
});
$('.article-share-qrcode').hover(function(){}, function(){
$('.hoverqrcode').hide();
});
});
</script>
<!-- Analytics Begin -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-28029597-1', '');
ga('send', 'pageview');
</script>
<!-- Analytics End -->
<!-- Totop Begin -->
<div id="totop">
<a title="返回顶部"><img src="/img/scrollup.png"/></a>
</div>
<script src="/js/totop.js"></script>
<!-- Totop End -->
<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->
<!-- MathJax End -->
<!-- Tiny_search Begin -->
<!-- Tiny_search End -->
</body>
</html>