forked from huluo666/huluo666.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
22 lines (22 loc) · 22.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
<!DOCTYPE html><html lang="zh-CN"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description"><title>Kimi DevBlog | Whatever is worth doing is worth doing well.</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=0.0.0"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/normalize/8.0.0/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/pure-min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/grids-responsive-min.css"><link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script>var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = 'https://hm.baidu.com/hm.js?' + '6a9ed51a920318450ff72d94cf2338aa';
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">Kimi DevBlog</h1><a id="logo" href="/.">Kimi DevBlog</a><p class="description">Whatever is worth doing is worth doing well.</p></div><div id="nav-menu"><a class="current" href="/."><i class="fa undefined"> 首页</i></a><a href="/archives/"><i class="fa undefined"> 归档</i></a><a href="/categories/macapp"><i class="fa undefined"> Mac应用</i></a><a href="/categories/devtools"><i class="fa undefined"> 开发工具</i></a><a href="/categories/essay"><i class="fa undefined"> 随笔</i></a><a href="/categories/read"><i class="fa undefined"> 阅读</i></a><a href="/categories/"><i class="fa undefined"> 分类</i></a><a href="/leaveword/"><i class="fa undefined"> 留言</i></a><a href="/categories/resume"><i class="fa undefined"> 简历</i></a><a href="/about/"><i class="fa undefined"> 关于</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/2018/04/02/React-Native开发环境搭建-Mac/">React Native开发环境搭建-Mac</a></h1><div class="post-meta">2018-04-02</div><div class="post-content"><h4 id="1、React-Native-Command-Line-Tools安装"><a href="#1、React-Native-Command-Line-Tools安装" class="headerlink" title="1、React Native Command Line Tools安装"></a>1、React Native Command Line Tools安装</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install -g react-native-cli</span><br></pre></td></tr></table></figure></div><p class="readmore"><a href="/2018/04/02/React-Native开发环境搭建-Mac/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/30/Runtime实现自定义description打印中文/">Runtime实现自定义description打印中文</a></h1><div class="post-meta">2018-03-30</div><div class="post-content"><p>实现原理简介:首先通过runtiime获取对象属性,然后取值进行自定义拼接,通过runtime方法交换自定义description方法,通过Unicode解码打印中文。只在Debug状态下进行方法交换</p>
<p>在接触runtime前,团队开发时为便于调试,常常需要在model里进行description重写,手工重写十分的繁琐不便。而通过runtime方法交换可以无需一行代码即可自定义description,十分方便。另外,从服务器请求下来的json数据包含中文,控制无法直接显示中文,通过重写<br>DescriptionWithLocale方法Uinicode转码后可以方便查看中文,方便开发调试。</p></div><p class="readmore"><a href="/2018/03/30/Runtime实现自定义description打印中文/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/30/Xcode格式化代码/">Xcode格式化代码</a></h1><div class="post-meta">2018-03-30</div><div class="post-content"><p><a href="https://github.com/nicklockwood/SwiftFormat" target="_blank" rel="noopener">SwiftFormat</a> -来自<a href="https://github.com/nicklockwood/iCarousel" target="_blank" rel="noopener">iCarousel</a>作者</p></div><p class="readmore"><a href="/2018/03/30/Xcode格式化代码/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/29/优雅的使用Sublime-Text3/">优雅的使用Sublime-Text3</a></h1><div class="post-meta">2018-03-29</div><div class="post-content"><p><a href="https://www.sublimetext.com/" target="_blank" rel="noopener">https://www.sublimetext.com/</a><br><a href="http://www.sublimetextcn.com/" target="_blank" rel="noopener">http://www.sublimetextcn.com/</a></p></div><p class="readmore"><a href="/2018/03/29/优雅的使用Sublime-Text3/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/27/iOS内存泄漏/">iOS内存泄漏</a></h1><div class="post-meta">2018-03-27</div><div class="post-content"><h4 id="Instrument-—-Leaks,Allocations,Analyze"><a href="#Instrument-—-Leaks,Allocations,Analyze" class="headerlink" title="Instrument — Leaks,Allocations,Analyze"></a>Instrument — Leaks,Allocations,Analyze</h4><p><strong>Analyze</strong>-静态分析工具</p></div><p class="readmore"><a href="/2018/03/27/iOS内存泄漏/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/27/iOS网络请求NSURLSession/">no-title</a></h1><div class="post-meta">2018-03-27</div><div class="post-content"><h1 id="NSURLSession"><a href="#NSURLSession" class="headerlink" title="NSURLSession"></a>NSURLSession</h1><p><a href="https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html" target="_blank" rel="noopener">https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html</a></p></div><p class="readmore"><a href="/2018/03/27/iOS网络请求NSURLSession/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/27/iOS常用第三分库源码分析/">iOS常用第三分库源码分析</a></h1><div class="post-meta">2018-03-27</div><div class="post-content"><h4 id="AFNetworking"><a href="#AFNetworking" class="headerlink" title="AFNetworking"></a>AFNetworking</h4><p>GitHub:<a href="https://github.com/AFNetworking/AFNetworking" target="_blank" rel="noopener">https://github.com/AFNetworking/AFNetworking</a></p></div><p class="readmore"><a href="/2018/03/27/iOS常用第三分库源码分析/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/26/iOS多线程/">iOS多线程</a></h1><div class="post-meta">2018-03-26</div><div class="post-content"><p>在 iOS 中其实目前有 <code>4</code> 套多线程方案</p>
<ul>
<li>NSThread</li>
<li>GCD</li>
<li>NSOperation & NSOperationQueue</li></div><p class="readmore"><a href="/2018/03/26/iOS多线程/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/23/iOS中Class相关方法区别/">iOS中Class相关方法区别</a></h1><div class="post-meta">2018-03-23</div><div class="post-content"><h5 id="一、isKindOfClass、isMemberOfClass和isSubclassOfClass区别"><a href="#一、isKindOfClass、isMemberOfClass和isSubclassOfClass区别" class="headerlink" title="一、isKindOfClass、isMemberOfClass和isSubclassOfClass区别"></a>一、<code>isKindOfClass</code>、<code>isMemberOfClass</code>和<code>isSubclassOfClass</code>区别</h5><figure class="highlight objectivec"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1.</span>首先申明 四个类 A->B->C->D ,继承关系 A继承B,B继承C,C继承D。即D是最顶层的父类,A是最基层的子类。</span><br><span class="line">A *a = [[A alloc]init];</span><br><span class="line"><span class="number">2.</span>isKindOfClass(对象方法)</span><br><span class="line">[a isKindOfClass:[A <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[a isKindOfClass:[B <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[a isKindOfClass:[C <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[a isKindOfClass:[D <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line"></span><br><span class="line"><span class="number">3.</span>isMemberOfClass(对象方法)</span><br><span class="line">[a isMemberOfClass:[A <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[a isMemberOfClass:[B <span class="keyword">class</span>]] <span class="comment">//return NO</span></span><br><span class="line">[a isMemberOfClass:[C <span class="keyword">class</span>]] <span class="comment">//return NO</span></span><br><span class="line">[a isMemberOfClass:[D <span class="keyword">class</span>]] <span class="comment">//return NO</span></span><br><span class="line"></span><br><span class="line"><span class="number">4.</span>isSubclassOfClass(类方法)</span><br><span class="line">[A isSubclassOfClass:[A <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[A isSubclassOfClass:[B <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[A isSubclassOfClass:[C <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br><span class="line">[A isSubclassOfClass:[D <span class="keyword">class</span>]] <span class="comment">//return YES</span></span><br></pre></td></tr></table></figure></div><p class="readmore"><a href="/2018/03/23/iOS中Class相关方法区别/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/03/22/KVO原理及实现/">KVO原理及实现</a></h1><div class="post-meta">2018-03-22</div><div class="post-content"><p>KVO的实现原理简述:<br> 当一个类的属性被观察的时候,系统会通过runtime动态的创建一个该类的派生类<strong>NSKVONotifying_A</strong>,并且会在这个类中重写基类被观察的属性的setter方法,而且系统将这个类的isa指针(<code>object_getClass(obj)</code>)指向了派生类,从而实现了给监听的属性赋值时调用的是派生类的setter方法。重写的setter方法会在调用原setter方法前后,通知观察对象值得改变。</p></div><p class="readmore"><a href="/2018/03/22/KVO原理及实现/">阅读全文</a></p></div><nav class="page-navigator"><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/24/">24</a><a class="extend next" rel="next" href="/page/2/">下一页</a></nav><script type="text/x-mathjax-config">MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script><script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML" async></script></div></div><div class="pure-u-1-4 hidden_mid_and_down"><div id="sidebar"><div class="widget"><form class="search-form" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank"><input type="text" name="q" maxlength="20" placeholder="Google Search"/><input type="hidden" name="sitesearch" value="http://huluo666.cn"/></form></div><div class="widget"><form class="search-form" action="//www.baidu.com/baidu" method="get" accept-charset="utf-8" target="_blank"><input type="search" name="word" maxlength="20" placeholder="百度搜索"/><input type="hidden" name="si" value="http://huluo666.cn"/><input name="tn" type="hidden" value="bds"/><input name="cl" type="hidden" value="3"/><input name="ct" type="hidden" value="2097152"/><input name="s" type="hidden" value="on"/></form></div><div class="widget"><div class="search-form"><input id="local-search-input" placeholder="本地搜索" type="text" name="q" results="0"/><div id="local-search-result"></div></div></div><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> 分类</i></div><ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/AppleScrips/">AppleScrips</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaScript/">JavaScript</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Mac/">Mac</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Node-js/">Node.js</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Swift/">Swift</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Xcode/">Xcode</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/devtool/">devtool</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/devtools/">devtools</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/essay/">essay</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/hexo/">hexo</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/html/">html</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/http/">http</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/iOS/">iOS</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/macapp/">macapp</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/node-js/">node.js</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/read/">read</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/resume/">resume</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/shell/">shell</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/其它/">其它</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/工具/">工具</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/快捷键/">快捷键</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/技巧/">技巧</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/正则/">正则</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/直播/">直播</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/算法/">算法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/编辑器/">编辑器</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/随笔/">随笔</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> 标签</i></div><div class="tagcloud"><a href="/tags/runtime-小书匠/" style="font-size: 15px;">runtime,小书匠</a> <a href="/tags/Xcode/" style="font-size: 15px;">Xcode</a> <a href="/tags/工具/" style="font-size: 15px;">工具</a> <a href="/tags/AppleScrips/" style="font-size: 15px;">AppleScrips</a> <a href="/tags/App上传/" style="font-size: 15px;">App上传</a> <a href="/tags/iOS/" style="font-size: 15px;">iOS</a> <a href="/tags/AutoLayout/" style="font-size: 15px;">AutoLayout</a> <a href="/tags/CocoaPods/" style="font-size: 15px;">CocoaPods</a> <a href="/tags/直播/" style="font-size: 15px;">直播</a> <a href="/tags/其它/" style="font-size: 15px;">其它</a> <a href="/tags/JavaScript/" style="font-size: 15px;">JavaScript</a> <a href="/tags/Node-js/" style="font-size: 15px;">Node.js</a> <a href="/tags/Mac/" style="font-size: 15px;">Mac</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/hexo/" style="font-size: 15px;">hexo</a> <a href="/tags/React-Native/" style="font-size: 15px;">React Native</a> <a href="/tags/ios/" style="font-size: 15px;">ios</a> <a href="/tags/新建-模板-小书匠/" style="font-size: 15px;">新建,模板,小书匠</a> <a href="/tags/Runtime-模板-小书匠/" style="font-size: 15px;">Runtime,模板,小书匠</a> <a href="/tags/Swift/" style="font-size: 15px;">Swift</a> <a href="/tags/Java/" style="font-size: 15px;">Java</a> <a href="/tags/测试/" style="font-size: 15px;">测试</a> <a href="/tags/html/" style="font-size: 15px;">html</a> <a href="/tags/http/" style="font-size: 15px;">http</a> <a href="/tags/iOS-动画/" style="font-size: 15px;">iOS,动画</a> <a href="/tags/FFMpeg/" style="font-size: 15px;">FFMpeg</a> <a href="/tags/编程规范/" style="font-size: 15px;">编程规范</a> <a href="/tags/代码优化/" style="font-size: 15px;">代码优化</a> <a href="/tags/正则/" style="font-size: 15px;">正则</a> <a href="/tags/警告/" style="font-size: 15px;">警告</a> <a href="/tags/iOS-动画-绘图/" style="font-size: 15px;">iOS,动画,绘图</a> <a href="/tags/java/" style="font-size: 15px;">java</a> <a href="/tags/技巧/" style="font-size: 15px;">技巧</a> <a href="/tags/node-js/" style="font-size: 15px;">node.js</a> <a href="/tags/随笔/" style="font-size: 15px;">随笔</a> <a href="/tags/算法/" style="font-size: 15px;">算法</a> <a href="/tags/极客导航/" style="font-size: 15px;">极客导航</a> <a href="/tags/自定义View/" style="font-size: 15px;">自定义View</a> <a href="/tags/HUD/" style="font-size: 15px;">HUD</a> <a href="/tags/搜索框/" style="font-size: 15px;">搜索框</a> <a href="/tags/searchBar/" style="font-size: 15px;">searchBar</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> 最近文章</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2018/04/02/React-Native开发环境搭建-Mac/">React Native开发环境搭建-Mac</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/30/Runtime实现自定义description打印中文/">Runtime实现自定义description打印中文</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/30/Xcode格式化代码/">Xcode格式化代码</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/29/优雅的使用Sublime-Text3/">优雅的使用Sublime-Text3</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/27/iOS内存泄漏/">iOS内存泄漏</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/27/iOS网络请求NSURLSession/">iOS网络请求NSURLSession</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/27/iOS常用第三分库源码分析/">iOS常用第三分库源码分析</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/26/iOS多线程/">iOS多线程</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/23/iOS中Class相关方法区别/">iOS中Class相关方法区别</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/03/22/KVO原理及实现/">KVO原理及实现</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-external-link"> 友情链接</i></div><ul></ul><a href="http://www.itechzero.com/" title="ITechzero" target="_blank">ITechzero</a><ul></ul><a href="https://github.com/trending?l=objective-c" title="GithubTrending" target="_blank">GithubTrending</a><ul></ul><a href="http://www.ctolib.com/" title="CTOLib" target="_blank">CTOLib</a><ul></ul><a href="http://www.iosappx.com/" title="苹果DEVUnion" target="_blank">苹果DEVUnion</a><ul></ul><a href="http://www.jianshu.com/users/97e4c0e7528e" title="木棠" target="_blank">木棠</a><ul></ul><a href="http://www.jianshu.com/users/a47bd3610273" title="LeapDing" target="_blank">LeapDing</a></div><div class="widget"><div class="widget-title"> Github名片</div><div class="github-card" data-github="huluo666" data-width="220" data-height="120" data-theme="medium"> </div><script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2018 <a href="/." rel="nofollow">Kimi DevBlog.</a> Powered by<a rel="nofollow" target="_blank" href="https://hexo.io"> Hexo.</a><a rel="nofollow" target="_blank" href="https://github.com/tufu9441/maupassant-hexo"> Theme</a> by<a rel="nofollow" target="_blank" href="https://github.com/pagecho"> Cho.</a></div></div></div><a class="show" id="rocket" href="#top"></a><script type="text/javascript" src="/js/totop.js?v=0.0.0" async></script><script type="text/javascript" src="//cdn.bootcss.com/fancybox/3.3.5/jquery.fancybox.min.js" async></script><script type="text/javascript" src="/js/fancybox.js?v=0.0.0" async></script><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/fancybox/3.3.5/jquery.fancybox.min.css"><script type="text/javascript" src="/js/search.js?v=0.0.0"></script><script>var search_path = 'search.xml';
if (search_path.length == 0) {
search_path = 'search.xml';
}
var path = '/' + search_path;
searchFunc(path, 'local-search-input', 'local-search-result');
</script><script type="text/javascript" src="/js/codeblock-resizer.js?v=0.0.0"></script><script type="text/javascript" src="/js/smartresize.js?v=0.0.0"></script></div></body></html>