Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
628 lines (263 loc) · 14.2 KB
/
Copy pathindex.html
File metadata and controls
628 lines (263 loc) · 14.2 KB
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
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>时光 • 印记</title>
<meta name="author" content="erik ge">
<meta name="description" content="一种技术的出现解决了一些问题,同时也会带来更多的问题。正因为Swift的高级特性,也由此带来了一些复杂性和一些潜在的问题。 ">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://erikge.com/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/stylesheets/custom.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="时光 • 印记" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<!--link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"-->
<link rel="stylesheet" href="/assets/foundation-icons.css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-50514628-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="https://www.google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:erikge.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">
<span class="blue_light">
时光 • 印记
</span>
<span class="blue_dark">
by erik
</span>
</a></li>
<li><a href="/iOS.html">iOS开发</a></li>
<li><a href="/archives.html">所有文章</a></li>
<li><a href="/about.html">关于</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/articles/SwiftTroubles">Swift的问题</a></h1>
<p class="meta">
<time datetime="2014-06-27T23:37:20+08:00" pubdate data-updated="true">Jun 27<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 58 minutes</font></span>
</header>
<div class="entry-content"><p>一种技术的出现解决了一些问题,同时也会带来更多的问题。正因为Swift的高级特性,也由此带来了一些复杂性和一些潜在的问题。</p>
</div>
<footer>
<a rel="full-article" href="/articles/SwiftTroubles">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/SwiftSyntax">Swift的语法细节</a></h1>
<p class="meta">
<time datetime="2014-06-26T14:09:50+08:00" pubdate data-updated="true">Jun 26<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 293 minutes</font></span>
</header>
<div class="entry-content"><p>Swift类似脚本语言的高级语法特性,让Swift语言使用起来很直观,很符合人的直觉,整体感觉很简洁很舒服。使用不同编程语言的程序员都能找到熟悉的感觉,这种亲切感必将吸引更多的开发者。<br>
本文总结Swift中需要注意的语法细节,完整的语法说明参考苹果的官方文档<a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/">The Swift Programming Language</a>。</p>
</div>
<footer>
<a rel="full-article" href="/articles/SwiftSyntax">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/SwiftCandy">Swift语法糖</a></h1>
<p class="meta">
<time datetime="2014-06-20T17:34:28+08:00" pubdate data-updated="true">Jun 20<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 186 minutes</font></span>
</header>
<div class="entry-content"><p>Swift中引入了很多高级语言的特性,如闭包、命名空间、泛型、强类型(同时拒绝阴式类型转换)、多个返回值(元组)等等,这些高级的语法糖用好了可以极大提升工作效率,用不好也是语法坑。<br>
我们先体验一下Swift的糖衣炮弹。</p>
</div>
<footer>
<a rel="full-article" href="/articles/SwiftCandy">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/SwiftResSummary">Swift资源汇总</a></h1>
<p class="meta">
<time datetime="2014-06-20T15:54:19+08:00" pubdate data-updated="true">Jun 20<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 2 minutes</font></span>
</header>
<div class="entry-content"><p>最近iOS的开发世界里最热的应该就是Swift了。Swift让大家再次站在了同一起跑线上,而且是那么酷的脚本语言的语法。<br>
经过这不到一个月的时间,Swift的相关教程、资源、论坛蓬勃而出。就像美剧养肥了再看一样,汇总一些养肥的资源。</p>
</div>
<footer>
<a rel="full-article" href="/articles/SwiftResSummary">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/DoubangoGettingStarted">Doubango Getting Started</a></h1>
<p class="meta">
<time datetime="2014-05-22T21:11:29+08:00" pubdate data-updated="true">May 22<span>nd</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 6 minutes</font></span>
</header>
<div class="entry-content"></div>
<footer>
<a rel="full-article" href="/articles/DoubangoGettingStarted">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/HelloWebrtc">Webrtc Getting Started</a></h1>
<p class="meta">
<time datetime="2014-05-17T13:44:24+08:00" pubdate data-updated="true">May 17<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 66 minutes</font></span>
</header>
<div class="entry-content"><p>开始搭建个可以看代码的环境。因为墙的原因和Webrtc用到了Chromium的toolchain的原因,获取代码和搭建环境变的异常复杂。前后折腾了一周的时间,整理一下,节省你宝贵的生命。</p>
</div>
<footer>
<a rel="full-article" href="/articles/HelloWebrtc">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/HelloGyp">Hello GYP</a></h1>
<p class="meta">
<time datetime="2014-05-17T13:43:55+08:00" pubdate data-updated="true">May 17<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 63 minutes</font></span>
</header>
<div class="entry-content"><p>GYP,<a href="https://code.google.com/p/gyp/">Generate Your Projects</a>,一个google开源的构建系统,最开始用于Chromium项目,现在一些其他的开源项目也开始使用GYP,如<a href="https://code.google.com/p/v8/">V8</a>和<a href="https://github.com/TooTallNate/node-gyp">node-gyp</a>。本文是学习使用GYP的笔记,算是一个GYP的简明教程吧。</p>
</div>
<footer>
<a rel="full-article" href="/articles/HelloGyp">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/HelloCMake">Hello CMake</a></h1>
<p class="meta">
<time datetime="2014-05-15T14:06:09+08:00" pubdate data-updated="true">May 15<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 50 minutes</font></span>
</header>
<div class="entry-content"><p>CMake简明语法参考。</p>
</div>
<footer>
<a rel="full-article" href="/articles/HelloCMake">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/HelloNinja">Hello Ninja</a></h1>
<p class="meta">
<time datetime="2014-05-12T11:28:25+08:00" pubdate data-updated="true">May 12<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 19 minutes</font></span>
</header>
<div class="entry-content"><p>Ninja,中文“忍者”的意思。这里说到的Ninja是一个<a href="https://github.com/martine/ninja">专注于速度的构建系统</a>,正式的版本可以从<a href="https://github.com/martine/ninja/releases">这里</a>下载。写本文时的版本是1.4.0。</p>
<p>最初遇到Ninja是在编译Webrtc的时候,记得以前还是感觉乱乱的<a href="https://code.google.com/p/gyp/">gyp</a>,不知什么时候换成陌生的Ninja了。当时匆匆解决了编译问题,没仔细看Ninja的细节,后来在看aosabook的<a href="http://aosabook.org/en/intro1.html">《The Architecture of Open Source Applications》</a>、<a href="http://aosabook.org/en/posa/introduction.html">《The Performance of Open Source Applications》</a>系列的书时,又提到了Ninja,不由得想用用试试看了。</p>
</div>
<footer>
<a rel="full-article" href="/articles/HelloNinja">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/articles/markdownSyntax">Markdown语法说明</a></h1>
<p class="meta">
<time datetime="2014-05-04T14:16:39+08:00" pubdate data-updated="true">May 4<span>th</span>, 2014</time>
</p>
<span><font size=".9em" color="#aaa"> <i class="fi-clock"></i> about 18 minutes</font></span>
</header>
<div class="entry-content"><p>Markdown简洁易用,非常适合整理文档。简单总结一下常用语法,可以作为cheatsheet。</p>
</div>
<footer>
<a rel="full-article" href="/articles/markdownSyntax">Read on →</a>
</footer>
</article>
<div class="pagination">
<a class="prev" href="/page/2/">← Older</a>
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/articles/SwiftTroubles">Swift的问题</a>
</li>
<li class="post">
<a href="/articles/SwiftSyntax">Swift的语法细节</a>
</li>
<li class="post">
<a href="/articles/SwiftCandy">Swift语法糖</a>
</li>
<li class="post">
<a href="/articles/SwiftResSummary">Swift资源汇总</a>
</li>
<li class="post">
<a href="/articles/DoubangoGettingStarted">Doubango Getting Started</a>
</li>
</ul>
</section>
<section>
<h1>Categories</h1>
<ul>
<li><a class='category' href='/categories/web/'>web (4)</a></li>
<li><a class='category' href='/categories/life/'>life (1)</a></li>
<li><a class='category' href='/categories/ios/'>iOS (5)</a></li>
<li><a class='category' href='/categories/build/'>build (3)</a></li>
<li><a class='category' href='/categories/webrtc/'>webrtc (1)</a></li>
</ul>
</section>
<section>
<!--a data-type="3" data-tmpl="200x200" data-tmplid="197" data-rd="2" data-style="2" data-border="1" href="#"></a-->
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2014 - erik ge -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<!--
Included file 'facebook_like.html' not found in _includes directory
Included file 'google_plus_one.html' not found in _includes directory
Included file 'twitter_sharing.html' not found in _includes directory -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F4921995449d31d8070c3bba89021c44d' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>