-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
403 lines (281 loc) · 21.4 KB
/
index.html
File metadata and controls
403 lines (281 loc) · 21.4 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>Andy矢倉 | 老板 来杯董小姐 去冰 少糖 多放点小姐</title>
<meta name="renderer" content="webkit">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="曾梦想仗剑走天涯">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Andy矢倉 | 老板 来杯董小姐 去冰 少糖 多放点小姐">
<meta name="twitter:description" content="曾梦想仗剑走天涯">
<meta property="og:type" content="article">
<meta property="og:title" content="Andy矢倉 | 老板 来杯董小姐 去冰 少糖 多放点小姐">
<meta property="og:description" content="曾梦想仗剑走天涯">
<meta name="author" content="Andy矢倉">
<link rel="stylesheet" href="/css/vno.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
<link rel="icon" href="/images/avatar-small.jpg">
<meta name="generator" content="hexo"/>
<link rel="alternate" type="application/rss+xml" title="Andy矢倉" href="/atom.xml">
<link rel="canonical" href="http://shicang1990.github.io"/>
</head>
<body class="home-template no-js">
<script src="http://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script src="/js/main.js"></script>
<span class="mobile btn-mobile-menu">
<i class="fa fa-list btn-mobile-menu__icon"></i>
<i class="fa fa-angle-up btn-mobile-close__icon hidden"></i>
</span>
<header class="panel-cover " style="background-image: url(/images/background-cover.jpg)">
<div class="panel-main">
<div class="panel-main__inner panel-inverted">
<div class="panel-main__content">
<a href="/" title="前往 Andy矢倉 的主页"><img src="/images/avatar.jpg" width="80" alt="Andy矢倉 logo" class="panel-cover__logo logo" /></a>
<h1 class="panel-cover__title panel-title"><a href="/" title="link to homepage for Andy矢倉">Andy矢倉</a></h1>
<span class="panel-cover__subtitle panel-subtitle">老板 来杯董小姐 去冰 少糖 多放点小姐</span>
<hr class="panel-cover__divider" />
<p class="panel-cover__description">曾梦想仗剑走天涯</p>
<hr class="panel-cover__divider panel-cover__divider--secondary" />
<div class="navigation-wrapper">
<div>
<nav class="cover-navigation cover-navigation--primary">
<ul class="navigation">
<li class="navigation__item"><a href="/#blog" title="访问博客" class="blog-button">博客</a></li>
<li class="navigation__item"><a href="/">主页</a></li>
<li class="navigation__item"><a href="/archives">所有文章</a></li>
</ul>
</nav>
</div>
<div>
<nav class="cover-navigation navigation--social">
<ul class="navigation">
<!-- Weibo-->
<li class="navigation__item">
<a href="http://weibo.com/ganmaojijie" title="我的微博" target="_blank">
<i class='social fa fa-weibo'></i>
<span class="label">Weibo</span>
</a>
</li>
<!-- Github -->
<li class="navigation__item">
<a href="https://github.com/shicang1990" title="查看我的GitHub主页" target="_blank">
<i class='social fa fa-github'></i>
<span class="label">Github</span>
</a>
</li>
<!-- Stack Overflow -->
<!-- Google Plus -->
<!-- Facebook -->
<li class="navigation__item">
<a href="https://www.facebook.com/wiwby" title="上Facebook找我" target="_blank">
<i class='social fa fa-facebook'></i>
<span class="label">Facebook</span>
</a>
</li>
<!-- Twitter -->
<li class="navigation__item">
<a href="https://twitter.com/Andy_shicang" title="上Twitter找我" target="_blank">
<i class='social fa fa-twitter'></i>
<span class="label">Twitter</span>
</a>
</li>
<li class="navigation__item">
<a href="/atom.xml" title="RSS" target="_blank">
<i class='social fa fa-rss'></i>
<span class="label">RSS</span>
</a>
</li>
<li class="navigation__item">
<a href="mailto:shicang1990@gmail.com" title="邮件联系我" target="_blank">
<i class='social fa fa-envelope'></i>
<span class="label">Email</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div class="panel-cover--overlay cover-purple"></div>
</div>
</header>
<div class="content-wrapper">
<div class="content-wrapper__inner">
<div class="main-post-list">
<ol class="post-list">
<li>
<h2 class="post-list__post-title post-title"><a href="/2016/12/12/2016-12-12-Self-sizing-Table-View-Cells/" title="link to post.title">UITableViewCell - 自适应速成大法</a></h2>
<p class="excerpt">
原文地址:https://www.raywenderlich.com/129059/self-sizing-table-view-cells转载地址:http://www.rockerhx.com/2016/12/12/2016-12-12-Self-sizing-Table-View-Cells/
最近滚回成都忙房子的事情,一直没时间更新,今天在群里开到好多人在聊很多培训机构都已经辞掉iOS培训老师,关闭iOS培训课程。这尼玛回想在乔帮主时代,开发iOS还是件可以装好几年逼,而如今,日落黄昏啊。纵观近几年,有太多培训机构当搅屎棍进来瞎掺和贵国的全民创业,伪造简历不说,那帮菜鸟的技术真的是辣眼睛,卧槽,好像跑偏了,今天不是来申讨培训党的,我们是正经教程,还是回到主路继续开车~~~
…
</p>
<div class="post-list__meta"><time datetime="2016-12-12T08:26:38.000Z" class="post-list__meta--date date">12月 12 2016</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Cell/">Cell</a>, <a class="tag-link" href="/tags/TableView/">TableView</a>, <a class="tag-link" href="/tags/iOS/">iOS</a>
</span><a class="btn-border-small" href="/2016/12/12/2016-12-12-Self-sizing-Table-View-Cells/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2016/05/31/2016-05-31-Failed-Import-Bridging-Header/" title="link to post.title">Failed to import bridging header 的奇葩解决方案</a></h2>
<p class="excerpt">
本人是个升级控,只要有需要升级的看看日志没啥问题就开整,等了大半年的Cocoapods的1.0.0终于出正式版本了,介于0.38.0到0.39.0的痛苦过程,心里有点小担心,不过那时还好是Objective-C,问题出在配置上都可以stackoverflow解决,这次要面对这次还要多面临Swift的挑战,废话太多了,直接开整。
升级的过程还是老套路:
1sudo gem install cocoapods
老套路还是还是老问题/usr下路径权限不够,试着改变权限:
1sudo chown $(whoami):admin /usr/local &amp;&amp; sudo chown -R $(whoami):admin /usr/local
1sudo chown $(whoami):admin /usr/bin &amp;&amp; sudo chown -R $(whoami):admin /usr/bin
…
</p>
<div class="post-list__meta"><time datetime="2016-05-30T16:06:05.000Z" class="post-list__meta--date date">5月 31 2016</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Xcode/">Xcode</a>
</span><a class="btn-border-small" href="/2016/05/31/2016-05-31-Failed-Import-Bridging-Header/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2016/05/19/2016-05-19-UIView-transitionFromView-Error/" title="link to post.title">UIView transitionFromView导致子视图Constraints失效</a></h2>
<p class="excerpt">
项目开发需要实现一个简单的效果,一个音乐专辑,需要实现定时反复3D旋转的效果,这个效果很简单,利用iOS自带的动画接口对应的Flip动画即可,效果如下:
开发的时候用Xib管理专辑两个子View,在使用UIView快速动画接口1+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^ __nullable)(BOOL finished))completion;
和UIViewAnimationOptionTransitionFlipFromLeft搭配使用的时候出现第一个奇怪的问题:动画执行之后在使用UIViewAnimationOptionTransitionFlipFromRight反转翻转效果出现的情况就是翻转一般View消失了,经过调试后发现,因为是使用Xib管理,所以Property声明是weak,就像这样:1@property (weak, nonatomic) IBOutlet UIView *coverContainer;
所以fromView对应的子视图被系统管理在动画执行之后就被释放掉了,导致动画反转两次之后正反两个View都消失了。
…
</p>
<div class="post-list__meta"><time datetime="2016-05-19T03:58:19.000Z" class="post-list__meta--date date">5月 19 2016</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Animation/">Animation</a>, <a class="tag-link" href="/tags/Layout/">Layout</a>
</span><a class="btn-border-small" href="/2016/05/19/2016-05-19-UIView-transitionFromView-Error/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2016/05/05/2016-04-20-UICollectionViewLayout/" title="link to post.title">UICollectionView 布局自定义进阶</a></h2>
<p class="excerpt">
注意:本文的UICollectionView自定义是采用继承UICollectionViewLayout类的方式来自定义布局,而非系统默认使用UICollectionViewFlowLayout类来修改参数的方式。
【必须】定制UICollectionViewLayout必须覆盖的方法且执行顺序如下:123- (void)prepareLayout;- (CGSize)collectionViewContentSize;- (NSArray&lt;UICollectionViewLayoutAttributes *&gt; *)layoutAttributesForElementsInRect:(CGRect)rect;
…
</p>
<div class="post-list__meta"><time datetime="2016-05-05T04:52:15.000Z" class="post-list__meta--date date">5月 5 2016</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Layout/">Layout</a>, <a class="tag-link" href="/tags/UICollectionView/">UICollectionView</a>, <a class="tag-link" href="/tags/UICollectionViewLayout/">UICollectionViewLayout</a>
</span><a class="btn-border-small" href="/2016/05/05/2016-04-20-UICollectionViewLayout/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2016/02/02/2016-02-02-Sketch-Tutorial-for-iOS-Developers/" title="link to post.title">给iOS开发者的Sketch入门教程</a></h2>
<p class="excerpt">
注意:这是一篇译文,如果你够装逼,完全可以浏览原文:Sketch Tutorial for iOS Developers如需转载,请注明出处。谢谢!!!转载地址:http://www.rockerhx.com/2016/02/02/2016-02-02-Sketch-Tutorial-for-iOS-Developers/此教程已整理成GitBook:GitBook - 给iOS开发者的Sketch入门教程国内入口:极客学院 - 给iOS开发者的Sketch入门教程
作为一名iOS开发者,我经历过几个没有设计师的项目,结果就是,痛苦的一逼。做这种类型的项目,设计是非常重要的,特别是迭代设计。在每个项目最开始的时候,客户其实并不知道自己想要什么。直接堆码之前我们还是有点小小的设计知识更有助于你跟客户撕逼的时候占上风,其实我们只是想更完美,难道不是吗?
这里我更推荐的做法是,迭代原型,而不是先堆码,这才是一个合格码农该做的。但是怎样才能在没有设计师的前提下设计原型,那就必须用到Sketch这货。Sketch是创作Logo和Iconfeel倍儿爽的工具。它是基于矢量图形的,这意味着你在调整图形大小的时候可以不用担心丢失画质。它包含iPhone设备尺寸的画板和一个内置的UIKit模板,你也可以用Sketch来创建迭代设计原型。另外,Sketch还是一个让程序汪能快速上手的工具。
在本教程中,你可以学到:
使用UIKit模板创建一个模型。
使用矢量工具创建Icon。
通过组合基本形状制作Icon。
为Xcode导出图片素材资源。而最重要的,你能以开发者的身份来学习这份教程。准备好就可以升级了您的设计技能!Let’s do it!
…
</p>
<div class="post-list__meta"><time datetime="2016-02-02T13:33:15.000Z" class="post-list__meta--date date">2月 2 2016</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Sketch/">Sketch</a>, <a class="tag-link" href="/tags/Xcode/">Xcode</a>
</span><a class="btn-border-small" href="/2016/02/02/2016-02-02-Sketch-Tutorial-for-iOS-Developers/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2015/11/07/2015-11-07-Two-Views-Center-Superview/" title="link to post.title">手把手AutoLayout - 两个不等宽View,“共同”居中于Superview</a></h2>
<p class="excerpt">
刷微博看到nixzhu的AutoLayout Tips,Tip 1是基于纯代码实现,由于本人比较懒,使用AutoLayout除非万不得已,否则是不会动代码,这里使用可视化的方式来演示,只是觉得可能更便于理解!
那么开始,新建工程就不用多说了,或者懒癌患者下载原作者工程(还是都下载吧,方便看效果)。
打开工程跑一盘,看下效果:
…
</p>
<div class="post-list__meta"><time datetime="2015-11-06T18:34:39.000Z" class="post-list__meta--date date">11月 7 2015</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/AutoLayout/">AutoLayout</a>, <a class="tag-link" href="/tags/iOS/">iOS</a>
</span><a class="btn-border-small" href="/2015/11/07/2015-11-07-Two-Views-Center-Superview/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2015/10/28/2015-10-28-LaunchScreen-Animation/" title="link to post.title">通过Xcode自带LaunchScreen布局文件自定义启动动画</a></h2>
<p class="excerpt">
大晚上刷微博,刷到一篇转发自里脊串的博客Tips:获取APP的Launch Image
大致内容是:通过获取打包到App里的启动图,初始化一个UIImageView与屏幕同等大小再加载到UIWindow上来做启动延时,从而达到自定义启动动画的目的。代码里的各种Key没太看懂,放到工程里也没法显示效果。文中的意思是不要增加启动图的方式来适配,那我想了想iOS启动画面的方式目前我所知就两种:启动图和布局文件。我现在基本上没有用图片作为启动图,都是直接用布局文件搞定。
…
</p>
<div class="post-list__meta"><time datetime="2015-10-27T18:29:19.000Z" class="post-list__meta--date date">10月 28 2015</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/iOS/">iOS</a>
</span><a class="btn-border-small" href="/2015/10/28/2015-10-28-LaunchScreen-Animation/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2015/10/27/2015-10-27-REFrostedViewController-UITableViewCell-Swipe-Delete/" title="link to post.title">REFrostedViewController与UITableViewCell侧滑删除的坑</a></h2>
<p class="excerpt">
近来项目中需要用到侧滑菜单,测试了一下REFrostedViewController还能满足需求,本着不重复造轮子的原则,决定使用。
根据作者:romaonthego提供的Demo玩起来比较嗨,一看就明白,于是乎我也搞了个UINavigationController加入UIPanGestureRecognizer手势来实时移动菜单,所有的视图控制器都在这个UINavigationController的管理下健康成长。
直到我接到一个需求是表格侧滑删除(也就是Cell的侧滑删除),心想这特么多简单回事,看着这需求,还偷着乐,Android那逼蛋疼了(听说是不好整,具体我也不知道),直接用系统提供的代理三下五除二搞定,那就在这时准备丝滑一下的时候,采坑了。
…
</p>
<div class="post-list__meta"><time datetime="2015-10-26T18:15:52.000Z" class="post-list__meta--date date">10月 27 2015</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/REFrostedViewController/">REFrostedViewController</a>, <a class="tag-link" href="/tags/UITableView/">UITableView</a>
</span><a class="btn-border-small" href="/2015/10/27/2015-10-27-REFrostedViewController-UITableViewCell-Swipe-Delete/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2015/10/02/2015-10-02-OSX-10.11-Homebrew-Issue/" title="link to post.title">升级OS X El Capitan导致Homebrew权限失效</a></h2>
<p class="excerpt">
昨天刚升级了Homebrew,今天使用Homebrew导致权限不够,找资料看到因为OS X El Capitan引入了系统完整性保护机制,所以使用Homebrew的同学请在升级后在终端执行1sudo chown $(whoami):admin /usr/local &amp;&amp; sudo chown -R $(whoami):admin /usr/local
Macports因为安装在/o
…
</p>
<div class="post-list__meta"><time datetime="2015-10-02T02:35:00.000Z" class="post-list__meta--date date">10月 2 2015</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Homebrew/">Homebrew</a>, <a class="tag-link" href="/tags/Term/">Term</a>
</span><a class="btn-border-small" href="/2015/10/02/2015-10-02-OSX-10.11-Homebrew-Issue/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
<li>
<h2 class="post-list__post-title post-title"><a href="/2015/09/07/2015-09-07-UIAppearanceTutorial/" title="link to post.title">UIAppearance教程:入门</a></h2>
<p class="excerpt">
开发了App这么久,是不是觉得主题功能很繁琐,那么接下来良辰我将动用北京的势力来指导你如何为你的App增加主题功能。
原文:http://www.raywenderlich.com/108766/uiappearance-tutorial转载请注明出处:http://www.rockerhx.com/2015/09/07/2015-09-07-UIAppearanceTutorial/
主题教程:现在开始虽然拟物化在iOS里已是过去式,这并不意味着你的iOS应用控件就限于原始外观。虽然你可以从头开始开发自己自定义控件,Apple官方还是建议您使用标准UIKit控件并且利用这各种自定义技术优势。这是因为,UIKit的控制更高效,并且这种自定义控件是在给未来铺路。在本UIAppearance教程中,您将使用一些基本的UI自定义技术来定制一个普通的宠物搜索应用,并使其脱颖而出! :]
…
</p>
<div class="post-list__meta"><time datetime="2015-09-07T13:23:30.000Z" class="post-list__meta--date date">9月 7 2015</time> • <span class="post-list__meta--tags tags">于
<a class="tag-link" href="/tags/Theme/">Theme</a>, <a class="tag-link" href="/tags/iOS/">iOS</a>
</span><a class="btn-border-small" href="/2015/09/07/2015-09-07-UIAppearanceTutorial/">继续阅读</a></div>
<hr class="post-list__divider" />
</li>
</ol>
<nav class="pagination" role="navigation">
<span class="pagination__page-number" > 1 / 3 </span>
<a class="older-posts pagination__older btn btn-small btn-tertiary" href="/page/2/">更早 →</a>
</nav>
</div>
<footer class="footer">
<span class="footer__copyright">
本站点采用 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a>
</span>
<span class="footer__copyright">
基于 <a href="http://hexo.io">Hexo</a> 搭建,感谢 <a href="https://pages.github.com/">GitHub Pages</a> 提供免费的托管服务
</span>
<span class="footer__copyright">
© 2016 - 本站由 <a href="/">@Monniya</a> 创建,
使用 <a href="https://github.com/monniya/hexo-theme-new-vno ">hexo-theme-new-vno</a> 主题,
修改自 <a href="https://github.com/lenbo-ma/hexo-theme-vno" target="_blank">Vno</a>, 原创出自<a href="http://github.com/onevcat/vno" target="_blank">onevcat</a>
</span>
</footer>
</div>
</div>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?f1811f144f64379f918cf1ef7bf3f3cb";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
</body>
</html>