-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
980 lines (552 loc) · 32 KB
/
index.html
File metadata and controls
980 lines (552 loc) · 32 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
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
<!DOCTYPE HTML>
<html lang="zh-CN,en,default">
<head>
<meta charset="UTF-8">
<title>yulingtianxia's blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta name="author" content="杨萧玉">
<meta name="description" content="小熊是只大老鼠">
<meta property="og:type" content="website">
<meta property="og:title" content="yulingtianxia's blog">
<meta property="og:url" content="http://yulingtianxia.com/index.html">
<meta property="og:site_name" content="yulingtianxia's blog">
<meta property="og:description" content="小熊是只大老鼠">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="yulingtianxia's blog">
<meta name="twitter:description" content="小熊是只大老鼠">
<meta name="twitter:creator" content="@yulingtianxia">
<link rel="publisher" href="106642427004837273341">
<link rel="alternative" href="/atom.xml" title="yulingtianxia's blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="apple-touch-icon" href="/img/jacman.jpg">
<link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<header>
<div>
<div id="imglogo">
<a href="/"><img src="/img/logo.png" alt="yulingtianxia's blog" title="yulingtianxia's blog"/></a>
</div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="yulingtianxia's blog">yulingtianxia's blog</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="/">Home</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/tags">Tags</a></li>
<li><a href="/about">About</a></li>
<li>
<form class="search" action="/search/index.html" method="get" accept-charset="utf-8">
<label>Search</label>
<input type="search" id="search" autocomplete="off" name="q" maxlength="20" placeholder="Google" />
</form>
</li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div id="main">
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/11/28/pbxprojHelper/" title="pbxprojHelper--Xcode工程文件助手" itemprop="url">pbxprojHelper--Xcode工程文件助手</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-11-27T16:03:08.000Z" itemprop="datePublished"> 发表于 2016-11-28</time>
</p>
</header>
<div class="article-content">
<p><a href="https://github.com/yulingtianxia/pbxprojHelper">pbxprojHelper</a> 可以帮你快速配置 Xcode 工程文件,省去麻烦的人工手动操作。项目开源,使用 Swift 开发,详细介绍请见<a href="https://github.com/yulingtianxia/pbxprojHelper/blob/master/Documentation/README_ZH.md">使用说明</a>。除了 Mac App 外还提供了命令行工具 <a href="https://github.com/yulingtianxia/pbxprojHelper/releases/download/1.1.3/pbxproj"><code>pbxproj</code></a>,它集成了 <a href="https://github.com/yulingtianxia/pbxprojHelper">pbxprojHelper</a> 的核心功能,同样简易实用。</p>
<p>因为 <a href="https://github.com/yulingtianxia/pbxprojHelper/blob/master/Documentation/README_ZH.md">README_ZH</a> 中对使用方法已经讲得很详细了,这里重点说的是产品方案和技术实现。</p>
<p class="article-more-link">
<a href="/blog/2016/11/28/pbxprojHelper/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Xcode/">Xcode</a><a href="/tags/Swift/">Swift</a><a href="/tags/macOS/">macOS</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/11/28/pbxprojHelper/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/11/28/pbxprojHelper/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/10/30/Optimizing-App-Startup-Time/" title="优化 App 的启动时间" itemprop="url">优化 App 的启动时间</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-10-30T05:11:10.000Z" itemprop="datePublished"> 发表于 2016-10-30</time>
</p>
</header>
<div class="article-content">
<p>这是一篇 WWDC 2016 Session 406 的学习笔记,从原理到实践讲述了如何优化 App 的启动时间。</p>
<p class="article-more-link">
<a href="/blog/2016/10/30/Optimizing-App-Startup-Time/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Runtime/">Runtime</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/10/30/Optimizing-App-Startup-Time/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/10/30/Optimizing-App-Startup-Time/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/09/28/Let-s-Talk-About-project-pbxproj/" title="Let's Talk About project.pbxproj" itemprop="url">Let's Talk About project.pbxproj</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-09-28T14:58:19.000Z" itemprop="datePublished"> 发表于 2016-09-28</time>
</p>
</header>
<div class="article-content">
<p>project.pbxproj 文件被包含于 Xcode 工程文件 *.xcodeproj 之中,存储着 Xcode 工程的各项配置参数。它本质上是一种旧风格的 Property List 文件,历史可追溯到 NeXT 的 OpenStep。其可读性不如 xml 和 json,苹果却一直沿用至今,作为一家以创新闻名的公司可能这里剩下的就是情怀吧。</p>
<p>本文谈了下 project.pbxproj 的知识,并总结了一些操作工程文件的优秀轮子,并在最后给出了自己的解决方案 <a href="https://github.com/yulingtianxia/pbxprojHelper">pbxprojHelper</a>。</p>
<p class="article-more-link">
<a href="/blog/2016/09/28/Let-s-Talk-About-project-pbxproj/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Xcode/">Xcode</a><a href="/tags/macOS/">macOS</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/09/28/Let-s-Talk-About-project-pbxproj/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/09/28/Let-s-Talk-About-project-pbxproj/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/08/29/Some-Experience-of-Gesture/" title="处理手势冲突和错乱的一点经验" itemprop="url">处理手势冲突和错乱的一点经验</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-08-29T02:53:51.000Z" itemprop="datePublished"> 发表于 2016-08-29</time>
</p>
</header>
<div class="article-content">
<p>如果一个页面上包含着很多视图,而且界面上业务逻辑比较复杂,那么手势响应冲突或者错乱很容易发生。这时就得猥琐点啦,见招拆招。</p>
<p class="article-more-link">
<a href="/blog/2016/08/29/Some-Experience-of-Gesture/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/iOS/">iOS</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/08/29/Some-Experience-of-Gesture/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/08/29/Some-Experience-of-Gesture/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/07/18/TBActionSheet/" title="自制一款强大的 ActionSheet" itemprop="url">自制一款强大的 ActionSheet</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-07-18T04:36:15.000Z" itemprop="datePublished"> 发表于 2016-07-18</time>
</p>
</header>
<div class="article-content">
<p>iOS 系统自带的 <code>UIActionSheet</code> 无法满足开发中高度个性化的 UI 风格和代码风格,所以我决定自己动手丰衣足食,于是 <a href="https://github.com/yulingtianxia/TBActionSheet"><code>TBActionSheet</code></a> 诞生了:</p>
<p><img src="https://github.com/yulingtianxia/TBActionSheet/blob/master/images/demo.gif?raw=true" width="50%" height="50%"></p>
<p>Github:<a href="https://github.com/yulingtianxia/TBActionSheet">https://github.com/yulingtianxia/TBActionSheet</a></p>
<p><a href="https://github.com/yulingtianxia/TBActionSheet"><code>TBActionSheet</code></a> 不仅还原了 <code>UIActionSheet</code> 的几乎所有功能和 API,还在此基础上支持如下功能:</p>
<ol>
<li>block 语法</li>
<li>插入自定义的 Header 视图</li>
<li>自定义字体、颜色、尺寸、圆角等</li>
<li>将毛玻璃效果支持到了 iOS7,且可以定义颜色</li>
<li>支持 Cocoapods 和 Carthage</li>
<li>支持在 Title 下面设置 Message</li>
<li>支持点击背景关闭</li>
<li>可以在显示后动态更新 UI</li>
</ol>
<p class="article-more-link">
<a href="/blog/2016/07/18/TBActionSheet/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/iOS/">iOS</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/07/18/TBActionSheet/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/07/18/TBActionSheet/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/06/15/Objective-C-Message-Sending-and-Forwarding/" title="Objective-C 消息发送与转发机制原理" itemprop="url">Objective-C 消息发送与转发机制原理</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-06-15T12:12:48.000Z" itemprop="datePublished"> 发表于 2016-06-15</time>
</p>
</header>
<div class="article-content">
<p>消息发送和转发流程可以概括为:消息发送(Messaging)是 Runtime 通过 selector 快速查找 IMP 的过程,有了函数指针就可以执行对应的方法实现;消息转发(Message Forwarding)是在查找 IMP 失败后执行一系列转发流程的慢速通道,如果不作转发处理,则会打日志和抛出异常。</p>
<p><strong>本文不讲述开发者在消息发送和转发流程中需要做的事,而是讲述原理。能够很好地阅读本文的前提是你对 <a href="http://yulingtianxia.com/blog/2014/11/05/objective-c-runtime/">Objective-C Runtime</a> 已经有一定的了解,关于什么是消息,Class 的结构,selector、IMP、元类等概念将不再赘述</strong>。本文用到的源码为 objc4-680 和 CF-1153.18,逆向 CoreFoundation.framework 的系统版本为 macOS 10.11.5,汇编语言架构为 x86_64。</p>
<p class="article-more-link">
<a href="/blog/2016/06/15/Objective-C-Message-Sending-and-Forwarding/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Objective-C/">Objective-C</a><a href="/tags/Runtime/">Runtime</a><a href="/tags/Message-Forwarding/">Message Forwarding</a><a href="/tags/Messaging/">Messaging</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/06/15/Objective-C-Message-Sending-and-Forwarding/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/06/15/Objective-C-Message-Sending-and-Forwarding/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/05/06/Let-your-WeChat-for-Mac-never-revoke-messages/" title="让你的微信不再被人撤回消息" itemprop="url">让你的微信不再被人撤回消息</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-05-06T10:24:04.000Z" itemprop="datePublished"> 发表于 2016-05-06</time>
</p>
</header>
<div class="article-content">
<p>处女座强迫症最讨厌别人发消息后撤回了,尤其是发的图片还没看清就被撤了,或者还没来得及看的消息就已经被撤回了。最近逆向工程很火,所以我也简单的逆向了一把微信 for Mac & iOS。</p>
<p class="article-more-link">
<a href="/blog/2016/05/06/Let-your-WeChat-for-Mac-never-revoke-messages/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/iOS/">iOS</a><a href="/tags/macOS/">macOS</a><a href="/tags/Reverse-Engineering/">Reverse Engineering</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/05/06/Let-your-WeChat-for-Mac-never-revoke-messages/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/05/06/Let-your-WeChat-for-Mac-never-revoke-messages/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/04/28/Find-Convex-Hull-with-Graham-Scan-Swift/" title="Find Convex Hull with Graham Scan & Swift" itemprop="url">Find Convex Hull with Graham Scan & Swift</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-04-28T14:37:16.000Z" itemprop="datePublished"> 发表于 2016-04-28</time>
</p>
</header>
<div class="article-content">
<p><a href="https://en.wikipedia.org/wiki/Convex_hull">凸包(Convex hull)</a> 是一个数学上的概念,在二维平面上可以想象成用一个橡皮筋套住一堆钉在平面上的钉子。本文讲述如何使用 Swift 实现 <a href="https://en.wikipedia.org/wiki/Graham_scan">Graham scan</a> 算法来寻找二维平面点集上的凸包。工程源码 Github:<a href="https://github.com/yulingtianxia/Algorithm-Experiment">https://github.com/yulingtianxia/Algorithm-Experiment</a></p>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/d/de/ConvexHull.svg" alt="By Maksim (original); en:User:Pbroks3 (redraw), via Wikimedia Commons"><br><img src="http://7ni3rk.com1.z0.glb.clouddn.com/convexhull/convexhull.gif" alt=""></p>
<p class="article-more-link">
<a href="/blog/2016/04/28/Find-Convex-Hull-with-Graham-Scan-Swift/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Swift/">Swift</a><a href="/tags/macOS/">macOS</a><a href="/tags/Algorithm/">Algorithm</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/04/28/Find-Convex-Hull-with-Graham-Scan-Swift/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/04/28/Find-Convex-Hull-with-Graham-Scan-Swift/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/03/28/Add-UITest-Label-for-UIAutomation/" title="为 UIAutomation 添加自动化测试标签的探索" itemprop="url">为 UIAutomation 添加自动化测试标签的探索</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-03-27T16:47:32.000Z" itemprop="datePublished"> 发表于 2016-03-28</time>
</p>
</header>
<div class="article-content">
<p>UIAutomation 是苹果提供的自动化测试框架,iOS 不像 Android 那样可以在 xml 文件中自动生成唯一的 id 作为标签,需要我们手动为控件添加可访问性(Accessibility)。如何让一个控件的可访问标签在当前页面唯一且不变呢?当然纯手工在代码中插入加标签的逻辑代码肯定是可行的,但费时费力,所以我在这里做一些用程序自动化添加标签尝试性的探索。</p>
<p>Github 传送门: <a href="https://github.com/yulingtianxia/TBUIAutoTest">TBUIAutoTest</a></p>
<p class="article-more-link">
<a href="/blog/2016/03/28/Add-UITest-Label-for-UIAutomation/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/iOS/">iOS</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/03/28/Add-UITest-Label-for-UIAutomation/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/03/28/Add-UITest-Label-for-UIAutomation/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blog/2016/02/27/TFSHelper/" title="自制一款 Mac 平台 URL 辅助工具" itemprop="url">自制一款 Mac 平台 URL 辅助工具</a>
</h1>
<p class="article-author">By
<a href="https://plus.google.com/106642427004837273341?rel=author" title="杨萧玉" target="_blank" itemprop="author">杨萧玉</a>
<p class="article-time">
<time datetime="2016-02-26T16:35:53.000Z" itemprop="datePublished"> 发表于 2016-02-27</time>
</p>
</header>
<div class="article-content">
<p>工作时经常会收到同事发来的一些链接,有的带空格的链接会断开,不能直接点击查看,需要手动复制完整链接并粘贴查看。所以我做了个 Mac 系统上的 URL 辅助工具,在复制 URL 时自动将其打开。还实现缓存常用链接、自动/手动连接切换、登录时启动等功能。开发语言为 Swift 3 和 AppleScript。</p>
<p class="article-more-link">
<a href="/blog/2016/02/27/TFSHelper/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-tags">
<span></span> <a href="/tags/Swift/">Swift</a><a href="/tags/macOS/">macOS</a><a href="/tags/Algorithm/">Algorithm</a><a href="/tags/AppleScript/">AppleScript</a>
</div>
</div>
<div class="comments-count">
<span></span>
<a href="/blog/2016/02/27/TFSHelper/#comments" class="ds-thread-count comments-count-link" data-thread-key="blog/2016/02/27/TFSHelper/" data-count-type="comments"> </a>
</div>
</footer>
</article>
<nav id="page-nav" class="clearfix">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">…</span><a class="page-number" href="/page/7/">7</a><a class="extend next" rel="next" href="/page/2/">Next<span></span></a>
</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="github-card">
<p class="asidetitle">Github 名片</p>
<div class="github-card" data-github="yulingtianxia" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
</div>
<div class="linkslist">
<p class="asidetitle">友情链接</p>
<ul>
<li>
<a href="http://pbxproj.yulingtianxia.com" target="_blank" title="pbxprojHelper">pbxprojHelper</a>
</li>
<li>
<a href="http://similarimagehunter.yulingtianxia.com" target="_blank" title="SimilarImageHunter">SimilarImageHunter</a>
</li>
<li>
<a href="http://spiral.yulingtianxia.com" target="_blank" title="Spiral">Spiral</a>
</li>
<li>
<a href="http://coloratom.yulingtianxia.com" target="_blank" title="ColorAtom">ColorAtom</a>
</li>
<li>
<a href="http://fish.yulingtianxia.com" target="_blank" title="养小鱼的水塘">养小鱼的水塘</a>
</li>
<li>
<a href="http://resume.yulingtianxia.com" target="_blank" title="我的简历">我的简历</a>
</li>
</ul>
</div>
<div class="tagcloudlist">
<p class="asidetitle">标签云</p>
<div class="tagcloudlist clearfix">
<a href="/tags/ARC/" style="font-size: 10px;">ARC</a> <a href="/tags/Algorithm/" style="font-size: 12.5px;">Algorithm</a> <a href="/tags/App-Extensions/" style="font-size: 10px;">App Extensions</a> <a href="/tags/AppGroups/" style="font-size: 10px;">AppGroups</a> <a href="/tags/AppleScript/" style="font-size: 10px;">AppleScript</a> <a href="/tags/C/" style="font-size: 11.25px;">C</a> <a href="/tags/CocoaPods/" style="font-size: 10px;">CocoaPods</a> <a href="/tags/Core-Data/" style="font-size: 15px;">Core Data</a> <a href="/tags/GitHub/" style="font-size: 12.5px;">GitHub</a> <a href="/tags/Java/" style="font-size: 10px;">Java</a> <a href="/tags/Message-Forwarding/" style="font-size: 10px;">Message Forwarding</a> <a href="/tags/Messaging/" style="font-size: 10px;">Messaging</a> <a href="/tags/Objective-C/" style="font-size: 17.5px;">Objective-C</a> <a href="/tags/Octopress/" style="font-size: 10px;">Octopress</a> <a href="/tags/RAC/" style="font-size: 11.25px;">RAC</a> <a href="/tags/Reference-Counting/" style="font-size: 10px;">Reference Counting</a> <a href="/tags/Reverse-Engineering/" style="font-size: 10px;">Reverse Engineering</a> <a href="/tags/Runtime/" style="font-size: 12.5px;">Runtime</a> <a href="/tags/Social-Framework/" style="font-size: 10px;">Social Framework</a> <a href="/tags/SpriteKit/" style="font-size: 16.25px;">SpriteKit</a> <a href="/tags/Swift/" style="font-size: 18.75px;">Swift</a> <a href="/tags/UIKit-Dynamics/" style="font-size: 10px;">UIKit Dynamics</a> <a href="/tags/VPN/" style="font-size: 10px;">VPN</a> <a href="/tags/Xcode/" style="font-size: 13.75px;">Xcode</a> <a href="/tags/iCloud/" style="font-size: 10px;">iCloud</a> <a href="/tags/iOS/" style="font-size: 20px;">iOS</a> <a href="/tags/macOS/" style="font-size: 16.25px;">macOS</a> <a href="/tags/字体/" style="font-size: 10px;">字体</a> <a href="/tags/本地化/" style="font-size: 10px;">本地化</a> <a href="/tags/碰撞检测/" style="font-size: 10px;">碰撞检测</a> <a href="/tags/翻译/" style="font-size: 12.5px;">翻译</a> <a href="/tags/设计模式/" style="font-size: 12.5px;">设计模式</a> <a href="/tags/转载/" style="font-size: 10px;">转载</a>
</div>
</div>
<div class="rsspart">
<a href="/atom.xml" target="_blank" title="rss">RSS 订阅</a>
</div>
<div class="weiboshow">
<p class="asidetitle">新浪微博</p>
<iframe width="100%" height="119" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=1680627603&verifier=c09974f5&dpc=1"></iframe>
</div>
<div class="doubanshow">
<p class="asidetitle">豆瓣秀</p>
<div>
<script type="text/javascript" src="http://www.douban.com/service/badge/53279288/?show=collection&n=12&columns=3&hidelogo=yes&hideself=yes&cat=book|movie" ></script>
</div>
</div>
</aside>
</div>
</div>
<footer><div id="footer" >
<div class="line">
<span></span>
<div class="author"></div>
</div>
<section class="info">
<p> Stay hungry, stay foolish <br/>
Talk is cheap, show me the code.</p>
</section>
<div class="social-font" class="clearfix">
<a href="http://weibo.com/1680627603" target="_blank" class="icon-weibo" title="微博"></a>
<a href="https://github.com/yulingtianxia" target="_blank" class="icon-github" title="github"></a>
<a href="http://stackoverflow.com/users/2374982" target="_blank" class="icon-stack-overflow" title="stackoverflow"></a>
<a href="https://twitter.com/yulingtianxia" target="_blank" class="icon-twitter" title="twitter"></a>
<a href="https://www.facebook.com/yulingtianxia" target="_blank" class="icon-facebook" title="facebook"></a>
<a href="https://www.linkedin.com/in/yulingtianxia" target="_blank" class="icon-linkedin" title="linkedin"></a>
<a href="https://www.douban.com/people/53279288" target="_blank" class="icon-douban" title="豆瓣"></a>
<a href="http://www.zhihu.com/people/yulingtianxia" target="_blank" class="icon-zhihu" title="知乎"></a>
<a href="https://plus.google.com/106642427004837273341?rel=author" target="_blank" class="icon-google_plus" title="Google+"></a>
<a href="mailto:yulingtianxia@gmail.com" target="_blank" class="icon-email" title="Email Me"></a>
</div>
<div class="cc-license">
<a href="http://creativecommons.org/licenses/by-nc-nd/4.0" class="cc-opacity" target="_blank">
<img src="/img/cc-by-nc-nd.svg" alt="Creative Commons" />
</a>
</div>
<p class="copyright">
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> © 2016
<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>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.article-content').each(function(i){
$(this).find('img').each(function(){
if ($(this).parent().hasClass('fancybox')) return;
var alt = this.alt;
if (alt) $(this).after('<span class="caption">' + alt + '</span>');
$(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
});
$(this).find('.fancybox').each(function(){
$(this).attr('rel', 'article' + i);
});
});
if($.fancybox){
$('.fancybox').fancybox();
}
});
</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-49704553-1', 'auto');
ga('send', 'pageview');
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?b5cb508df15ee6247a8c32c64eadb075";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</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>