<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>iPhone 开发技术</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/" />
    <link rel="self" type="application/atom+xml" href="http://iphone.ipsw.info/atom.xml" />
    <id>tag:iphone.ipsw.info,2009-09-30://3</id>
    <updated>2012-01-18T07:38:41Z</updated>
    <subtitle>CocoaTouch,Objective-C,CoreAnimation</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.37</generator>

<entry>
    <title>about TableView in Mac OS X</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2012/01/tableview-in-macosx.html" />
    <id>tag:iphone.ipsw.info,2012://3.391</id>

    <published>2012-01-18T06:37:06Z</published>
    <updated>2012-01-18T07:38:41Z</updated>

    <summary><![CDATA[问题来源 Mac OS X 直到Lion 才开始支持View base TableView&nbsp;那么如果应用程序要支持10.6-,是绝对不可以使用官方的API.那么要快速实现TableView Cell自定义非常复杂。可选方案: 1 IKImageBrowserView/IKImageBrowserCell 自定义显示比较麻烦，苹果就没想这个事情&nbsp; &nbsp; &nbsp;2&nbsp;NSCollectionView/NSCollectionViewItem 同上，自定义显示不够友好官方没有合适的，自己想偷懒，那么找一找，是不是有开源项目呢？1&nbsp;ColumnViewSample&nbsp;http://cocoawithlove.com/2010/03/custom-ui-bindings-in-interface-builder.html&nbsp;开发者Cocoa with Love 站长2&nbsp;PXListView &nbsp;https://github.com/Perspx/PXListView&nbsp;&nbsp;http://perspx.com/archives/making-list-views-really-fast/ 作者关于List view 的思考3 TWUI， Twitter on Mac&nbsp;https://github.com/twitter/twui&nbsp; 这个不介绍了，看github介绍吧4 others may be...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    <category term="tableview，mac" label="TableView，Mac" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[问题来源 <a class="zem_slink" href="http://www.apple.com/macosx/" title="Mac OS X" rel="homepage">Mac OS X</a> 直到Lion 才开始支持View base TableView<div>&nbsp;那么如果应用程序要支持10.6-,是绝对不可以使用官方的API.那么要快速实现TableView Cell自定义非常复杂。</div><div><br /></div><div>可选方案: <span class="Apple-style-span" style="color: rgb(116, 58, 167); font-family: Menlo; font-size: 18px; ">1 IKImageBrowserView/</span><span class="Apple-style-span" style="color: rgb(116, 58, 167); font-family: Menlo; font-size: 18px; ">IKImageBrowserCell 自定义显示比较麻烦，苹果就没想这个事情</span></div><div><span class="Apple-style-span" style="color: rgb(116, 58, 167); font-family: Menlo; font-size: 18px; ">&nbsp; &nbsp; &nbsp;2&nbsp;</span>NSCollectionView/NSCollectionViewItem 同上，自定义显示不够友好</div><div><br /></div><div>官方没有合适的，自己想偷懒，那么找一找，是不是有开源项目呢？</div><div>1&nbsp;<span class="Apple-style-span" style="border-collapse: collapse; color: rgb(68, 68, 68); font-family: Helvetica, Arial, Sans; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><a href="http://projectswithlove.com/projects/ColumnViewSample.zip" style="color: rgb(34, 85, 170); ">ColumnViewSample</a>&nbsp;</span><a href="http://cocoawithlove.com/2010/03/custom-ui-bindings-in-interface-builder.html">http://cocoawithlove.com/2010/03/custom-ui-bindings-in-interface-builder.html</a>&nbsp;开发者Cocoa with Love 站长</div><div><br /></div><div>2&nbsp;PXListView &nbsp;<a href="https://github.com/Perspx/PXListView">https://github.com/Perspx/PXListView</a>&nbsp;&nbsp;http://perspx.com/archives/making-list-views-really-fast/ 作者关于List view 的思考</div><div>3 TWUI， <a class="zem_slink" href="http://twitter.com" title="Twitter" rel="homepage">Twitter</a> on Mac&nbsp;<a href="https://github.com/twitter/twui">https://github.com/twitter/twui</a>&nbsp; 这个不介绍了，看github介绍吧</div><div>4 others may be</div><div><br /></div><div><br /></div><div><br /></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=b17d6a04-d9ab-4a4b-b156-e19f76201ec9" alt="Enhanced by Zemanta" style="border:none;float:right" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>两个小时解决掉3个 BAD_ACCESS 的收获</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/12/3-bad-access.html" />
    <id>tag:iphone.ipsw.info,2011://3.390</id>

    <published>2011-12-28T02:10:28Z</published>
    <updated>2011-12-28T02:12:38Z</updated>

    <summary><![CDATA[转一篇原文 http://www.xuzhe.com/?p=601首先，我说的是 iOS 开发，不是 Mac OS。其次，这次解决的三个 BAD_ACCESS 都是由于 iOS 程序在收到 Memory Warning 后，非当前 UIViewController 执行 viewDidUnload 后出现的问题。这类崩溃在真机上比较难测，因为是随机出现的，而且看 Crash Log 经常会看不出是哪行代码 BAD_ACCESS 了。所以这就需要善用模拟器提供的 "Hardware -&gt; Simulate Memory Warning" 功能了。同时为了能够方便的 Debug 出僵尸指针是谁，我在 Xcode 里加入以下三个环境变量：NSZombieEnabled NSAutoreleaseFreedObjectCheckEnabled NSDebugEnabledXcode 4 的话编辑一下 Scheme，加到 Environment Variables 里即可（如果以前没加过的话）。做完准备工作就能比较方便的进行...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<div>转一篇</div><div>原文 http://www.xuzhe.com/?p=601</div><div>首先，我说的是 iOS 开发，不是 Mac OS。</div><div><br /></div><div>其次，这次解决的三个 BAD_ACCESS 都是由于 iOS 程序在收到 Memory Warning 后，非当前 UIViewController 执行 viewDidUnload 后出现的问题。</div><div><br /></div><div>这类崩溃在真机上比较难测，因为是随机出现的，而且看 Crash Log 经常会看不出是哪行代码 BAD_ACCESS 了。所以这就需要善用模拟器提供的 "Hardware -&gt; Simulate Memory Warning" 功能了。</div><div><br /></div><div>同时为了能够方便的 Debug 出僵尸指针是谁，我在 Xcode 里加入以下三个环境变量：</div><div><br /></div><div>NSZombieEnabled NSAutoreleaseFreedObjectCheckEnabled NSDebugEnabled</div><div><br /></div><div>Xcode 4 的话编辑一下 Scheme，加到 Environment Variables 里即可（如果以前没加过的话）。</div><div><br /></div><div>做完准备工作就能比较方便的进行 Debug 了。可以每切换一次 UIViewController 就模拟一次内存警告，看会不会崩溃。</div><div><br /></div><div>接下来说说我这次遇到的三个问题。</div><div>1、一个低级错误</div><div><br /></div><div>由于我们有时会几个人同时改一个文件，结果就发生了A用完一个实例以后顺手给释放掉了，但是却把B写在 viewDidUnload 里的代码给留下了。自然也就过度释放了。</div><div><br /></div><div>这类过度释放的错误比较容易发现，只要改代码的时候稍微在原有文件里做一下搜索就能避免。</div><div><br /></div><div>2、关于 Interface Builder 里的实例生命周期有多长的问题。</div><div><br /></div><div>开发过 Mac OS 应用的同学都知道在开发 Mac 应用的时候，IB 里的实例 IBOutlet 到代码里是不用 retain 的。但是在 iOS 里却是要 retain 的。</div><div><br /></div><div>这有什么区别呢？</div><div><br /></div><div>如果你用的是 UIView 的话，的确，在 iOS 里不做 retain 也不要紧。因为 UIViewController 里的 UIView 本质上都是被 addSubview 到别的 UIView（UIWindow）里去的。但如果你在 IB 里放的是一个 NSObject，问题就出来了。</div><div><br /></div><div>这也就是我遇到的问题。iOS 会把这个 NSObject 释放掉！</div><div><br /></div><div>找这个问题花了我不少功夫，因为这个 NSObject 我只是在 IB 里连了连线，压根儿就没在代码里出现......解决方法其实很简单，在代码里加上</div><div><br /></div><div>@property (nonatomic, retain) NSObject *someObject;</div><div><br /></div><div>就好了（注意内存释放）。</div><div><br /></div><div>3、BCTabBarController 带来的噩梦</div><div><br /></div><div>在解决了以上问题后，整个程序仍然在满世界地不停的崩溃。这让我也很崩溃。咱好歹也算对 iOS 内存管理略有心得，搞个程序崩成这样实在是说不过去。</div><div><br /></div><div>继续找下去发现问题出在一个第三方的开源控件：BCTabBarController 上。</div><div><br /></div><div>用一个水准不高的第三方控件的结果就是给开发带来一定方便的同时，也带来了更多的麻烦（我不是在指责 BCTabBarController 的水准，因为要在苹果有限的公开 API 上完全自己来模拟原生 UITabBarController 的行为，的确是有难度的）。</div><div><br /></div><div>这次的问题出在 BC 调用其管理的 UIViewController 的 viewWillAppear: 函数时，忽略了该 UIViewController 可能已经 viewDidUnload 过了。一上来就直接调用 viewWillAppear: ，结果当然不是崩掉就是逻辑乱掉。</div><div><br /></div><div>解决方法是在 BC 调用 [viewController viewWillAppear:NO]; 之前加一句 [viewController view]; ，确保 viewDidLoad 先于 viewWillAppear: 被调用即可。</div><div><br /></div><div>注：loadView 和 viewDidLoad 都不应该自己直接去调用，用 [viewController view]; 这种方法来让 view 自行载入的好处是，如果 view 已经被载入了，这一步操作不会让所有 view 再被载入一次。</div><div><br /></div><div>现已发现的问题就是这么多，要在 iOS 上写个没有内存泄露又不会崩溃的程序实在是有难度。</div>]]>
        
    </content>
</entry>

<entry>
    <title>Mac 下查看某个App使用TCP 链接状况    </title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/12/mac-apptcp.html" />
    <id>tag:iphone.ipsw.info,2011://3.389</id>

    <published>2011-12-27T02:58:24Z</published>
    <updated>2011-12-27T02:59:26Z</updated>

    <summary><![CDATA[SSD:~ yarshure$ ps -ef|grep AirPlay|grep -v &nbsp;grep|awk '{print $2}'|xargs lsof -p |grep IPv4?\x9e? &nbsp;342 yarshure &nbsp; 16u &nbsp; &nbsp;IPv4 0xffffff8016b0c320 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:49883-&gt;114.80.128.121:http (ESTABLISHED)?\x9e? &nbsp;342 yarshure &nbsp; 19u &nbsp; &nbsp;IPv4 0xffffff8020d9ec00 &nbsp; &nbsp; &nbsp; 0t0...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<div>SSD:~ yarshure$ ps -ef|grep AirPlay|grep -v &nbsp;grep|awk '{print $2}'|xargs lsof -p |grep IPv4</div><div>?\x9e? &nbsp;342 yarshure &nbsp; 16u &nbsp; &nbsp;IPv4 0xffffff8016b0c320 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:49883-&gt;114.80.128.121:http (ESTABLISHED)</div><div>?\x9e? &nbsp;342 yarshure &nbsp; 19u &nbsp; &nbsp;IPv4 0xffffff8020d9ec00 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:50005-&gt;58.215.45.192:http (ESTABLISHED)</div><div>?\x9e? &nbsp;342 yarshure &nbsp; 21u &nbsp; &nbsp;IPv4 0xffffff8020d9fa40 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:49994-&gt;114.80.128.121:http (ESTABLISHED)</div><div>?\x9e? &nbsp;342 yarshure &nbsp; 23u &nbsp; &nbsp;IPv4 0xffffff8026da8de0 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:50008-&gt;114.80.128.121:http (ESTABLISHED)</div><div>?\x9e? &nbsp;342 yarshure &nbsp; 24u &nbsp; &nbsp;IPv4 0xffffff8020da16c0 &nbsp; &nbsp; &nbsp; 0t0 &nbsp; &nbsp; &nbsp;TCP 192.168.69.56:50009-&gt;58.215.45.192:http (ESTABLISHED)</div>]]>
        
    </content>
</entry>

<entry>
    <title>飞乐音乐电台 精选版 先锋版(更新)</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/12/airplay-release-beta.html" />
    <id>tag:iphone.ipsw.info,2011://3.388</id>

    <published>2011-12-02T15:33:33Z</published>
    <updated>2011-12-31T02:49:52Z</updated>

    <summary><![CDATA[下载飞乐音乐电台Mac OS X版 更新2011.12.31截图就不更新了，体验的赶紧下载尝鲜吧。AirPlay.zip&nbsp; 下载链接，点击前面的那个1 支持专辑和Artist 图片效果2 目前只用pre, pause,n 操作3 显示当前播的音乐专辑，演唱者，歌曲名字4 目前不支持切换电台，下周会实现&nbsp; &nbsp;可以手动切电台http://restful.airplayme.com/radios/selected.json&nbsp;查看电台id&nbsp; &nbsp;然后手动替换&nbsp;defaultstation.plist 文件中id 项目，重启即可2011.12.06 晚上版本下载地址：AirPlay.zip1 界面美化2 简单指出选电台2011.12.07 更新1 优化版本 胶片效果完善2 修改启动时不显示界面问题AirPlay.zip早期功能版本1 频道选择2 歌曲/艺人/专辑搜索3 歌词显示4 seek 功能下载地址&nbsp;AirPlayer_func_Ver.zip...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="Coding" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="airplay" label="AirPlay" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="puremac" label="Pure Mac" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="音乐电台" label="音乐电台" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="飞乐" label="飞乐" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<div><br /></div><div><br /></div><div><a href="http://iphone.ipsw.info/2011/12/31/AirPlay.zip">下载飞乐音乐电台Mac OS X版 更新2011.12.31</a></div><div><br /></div><div>截图就不更新了，体验的赶紧下载尝鲜吧。</div><div><br /></div><img alt="AirPlay.png" src="http://iphone.ipsw.info/2011/12/02/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202011-12-02%20%E4%B8%8B%E5%8D%8810.46.47.png" width="540" height="284" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /><div><strike><a href="http://iphone.ipsw.info/2011/12/02/AirPlay.zip">AirPlay.zip</a>&nbsp; 下载链接，点击前面的那个</strike></div><div>1 支持专辑和Artist 图片效果</div><div><strike>2 目前只用pre, pause,n 操作</strike></div><div>3 显示当前播的音乐专辑，演唱者，歌曲名字</div><div><strike>4 目前不支持切换电台，下周会实现</strike></div><div><strike>&nbsp; &nbsp;可以手动切电台<a href="http://restful.airplayme.com/radios/selected.json">http://restful.airplayme.com/radios/selected.json</a>&nbsp;查看电台id</strike></div><div><strike>&nbsp; &nbsp;然后手动替换&nbsp;defaultstation.plist 文件中id 项目，重启即可</strike></div><div><br /></div><div>2011.12.06 晚上版本</div><div><img alt="preview.png" src="http://iphone.ipsw.info/2011/12/06/preview.png" width="540" height="284" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></div><div><strike>下载地址：</strike></div><div><a href="http://iphone.ipsw.info/2011/12/06/AirPlay.zip"><strike>AirPlay.zip</strike></a></div><div><br /></div><div><br /></div><div>1 界面美化</div><div>2 简单指出选电台</div><div>2011.12.07 更新</div><div>1 优化版本 胶片效果完善</div><div>2 修改启动时不显示界面问题</div><div><a href="http://iphone.ipsw.info/2011/12/07/AirPlay.zip"><strike>AirPlay.zip</strike></a></div><div><br /></div><div><img alt="channel.png" src="http://iphone.ipsw.info/2011/12/07/channel.png" width="540" height="284" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></div><div><br /></div><div><br /></div><div>早期功能版本</div><div>1 频道选择</div><div>2 歌曲/艺人/专辑搜索</div><div>3 歌词显示</div><div>4 seek 功能</div><div><br /></div><div><img alt="airplay_func_ver.png" src="http://iphone.ipsw.info/2011/12/07/airplay_func_ver.png" width="948" height="461" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></div><div>下载地址&nbsp;<a href="http://iphone.ipsw.info/2011/12/07/AirPlayer_func_Ver.zip">AirPlayer_func_Ver.zip</a></div><div><br /></div><div><br /></div><div><br /></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=4765dd01-2bad-4ab7-9b60-81e1c624a21b" alt="Enhanced by Zemanta" style="border:none;float:right" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>无题 </title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/in-memory-of-my-mother.html" />
    <id>tag:iphone.ipsw.info,2011://3.387</id>

    <published>2011-11-22T13:46:42Z</published>
    <updated>2011-11-22T13:49:44Z</updated>

    <summary>晚上和哥哥姐姐在IM上聊了很多总想写很多事情，但是不知道如何写起。将来的某一天会下吧。...</summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[晚上和哥哥姐姐在IM上聊了很多<div>总想写很多事情，但是不知道如何写起。</div><div><br /></div><div>将来的某一天会下吧。</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Cocoa Tips and Tricks UsingBlocksAsContextInfo</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/cocoa-tips-and-tricks-usingblocksascontextinfo.html" />
    <id>tag:iphone.ipsw.info,2011://3.386</id>

    <published>2011-11-18T07:10:29Z</published>
    <updated>2011-11-18T07:11:22Z</updated>

    <summary>UsingBlocksAsContextInfo - Demonstrates how to implement Objective-C &quot;blocks&quot; passed in as the &apos;contextInfo&apos; to NSAlert, helping to handle the alert result.// This is a quick tip on how to use the context info as a block parameter. // You can...</summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; color: rgb(0, 0, 0); ">UsingBlocksAsContextInfo - Demonstrates how to implement Objective-C "blocks" passed in as the 'contextInfo' to NSAlert, helping to handle the alert result.</span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; color: rgb(0, 0, 0); "><br /></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// This is a quick tip on how to use the context info as a block parameter.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// You can use this type of pattern for any methods that have a delegate/selector/contextInfo pattern.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)btnShowAlertClicked:(<span style="color: #bd23a0">id</span>)sender&nbsp; {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000">&nbsp; &nbsp; </span><span style="color: #743aa7">NSAlert</span><span style="color: #000000"> *alert = [</span><span style="color: #743aa7">NSAlert</span><span style="color: #000000"> </span>alertWithMessageText<span style="color: #000000">:</span><span style="color: #d22723">@"Alert Message"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">defaultButton</span>:<span style="color: #d22723">@"Default Button"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">alternateButton</span>:<span style="color: #d22723">@"Alternate Button"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">otherButton</span>:<span style="color: #d22723">@"Other Button"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">informativeTextWithFormat</span>:<span style="color: #d22723">@"Informative Text"</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">BOOL</span> someLocalVariable = <span style="color: #bd23a0">YES</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// We create a block that can easily access local variables to this method.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// This is much easier than trying to package them all up into a contextInfo object</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">void</span> (^blockCallback)(<span style="color: #743aa7">NSInteger</span>) = ^(<span style="color: #743aa7">NSInteger</span> returnCode) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; </span>// Inside the block callback we can easily access locals</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bd23a0">if</span> (someLocalVariable) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bd23a0">if</span> (returnCode == <span style="color: #411a7f">NSAlertDefaultReturn</span>) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #d22723"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [</span><span style="color: #4e8187">button</span><span style="color: #000000"> </span><span style="color: #411a7f">setTitle</span><span style="color: #000000">:</span>@"Default Return Button Clicked!"<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <span style="color: #bd23a0">else</span> {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #d22723"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [</span><span style="color: #4e8187">button</span><span style="color: #000000"> </span><span style="color: #411a7f">setTitle</span><span style="color: #000000">:</span>@"Something else clicked...try again."<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; };</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// We copy the block, since it needs to stay alive for longer than the current scope</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000">&nbsp; &nbsp; [alert </span>beginSheetModalForWindow<span style="color: #000000">:</span><span style="color: #bd23a0">self</span><span style="color: #000000">.</span><span style="color: #4e8187">window</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">modalDelegate</span>:[<span style="color: #bd23a0">self</span> <span style="color: #411a7f">class</span>]</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">didEndSelector</span>:<span style="color: #bd23a0">@selector</span>(alertDidEnd:returnCode:contextInfo:)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #411a7f">contextInfo</span>:<span style="color: #78482d">Block_copy</span>(blockCallback)];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">+ (<span style="color: #bd23a0">void</span>)alertDidEnd:(<span style="color: #743aa7">NSAlert</span> *)alert returnCode:(<span style="color: #743aa7">NSInteger</span>)returnCode contextInfo:(<span style="color: #bd23a0">void</span> (^)(<span style="color: #743aa7">NSInteger</span> returnCode))continuationHandler {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; continuationHandler(returnCode);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// The block must always be retained before the first call. This is the matching release</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #78482d">Block_release</span>(continuationHandler);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title></title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/static-voi.html" />
    <id>tag:iphone.ipsw.info,2011://3.385</id>

    <published>2011-11-18T07:06:25Z</published>
    <updated>2011-11-18T07:06:42Z</updated>

    <summary><![CDATA[static void _processData(AppDelegate *self, NSInteger i) { &nbsp; &nbsp; // Notice that the _window can be accessed here, even though it is a private ivar &nbsp; &nbsp; // A compiler error (or warning) will happen if this method was outside...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span style="color: #bd23a0">static</span> <span style="color: #bd23a0">void</span> _processData(<span style="color: #4e8187">AppDelegate</span> *<span style="color: #bd23a0">self</span>, <span style="color: #743aa7">NSInteger</span> i) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// Notice that the _window can be accessed here, even though it is a private ivar</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; </span>// A compiler error (or warning) will happen if this method was outside the @implementation scope of AppDelegate.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #d22723"><span style="color: #000000">&nbsp; &nbsp; </span><span style="color: #411a7f">NSLog</span><span style="color: #000000">(</span>@"Processing %d in window %@"<span style="color: #000000">, i, </span><span style="color: #bd23a0">self</span><span style="color: #000000">-&gt;</span><span style="color: #4e8187">_window</span><span style="color: #000000">);</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)applicationDidFinishLaunching:(<span style="color: #743aa7">NSNotification</span> *)aNotification {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">for</span> (<span style="color: #743aa7">NSInteger</span> i = <span style="color: #3724d4">0</span>; i &lt; <span style="color: #3724d4">200</span>; i++) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #31595d">_processData</span>(<span style="color: #bd23a0">self</span>, i);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p> ]]>
        
    </content>
</entry>

<entry>
    <title>@金色</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/post-72.html" />
    <id>tag:iphone.ipsw.info,2011://3.384</id>

    <published>2011-11-15T07:35:47Z</published>
    <updated>2011-11-15T07:38:26Z</updated>

    <summary><![CDATA[ @yarshure 2011.09.19 下午 &nbsp;...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="iPhone" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<a href="http://iphone.ipsw.info/assets_c/2011/11/kong_hometown-133.html" onclick="window.open('http://iphone.ipsw.info/assets_c/2011/11/kong_hometown-133.html','popup','width=2592,height=1936,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://iphone.ipsw.info/assets_c/2011/11/kong_hometown-thumb-640x478-133.jpg" width="640" height="478" alt="kong_hometown.JPG" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a> <div>@yarshure 2011.09.19 下午 &nbsp;</div>]]>
        
    </content>
</entry>

<entry>
    <title>AppKit 一点笔记(三)</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/appkit-2.html" />
    <id>tag:iphone.ipsw.info,2011://3.383</id>

    <published>2011-11-15T06:38:55Z</published>
    <updated>2011-11-15T07:30:54Z</updated>

    <summary><![CDATA[程序如何运行？&nbsp; 入口main函数&nbsp;&nbsp;#import &lt;Cocoa/Cocoa.h&gt; int main(int argc, char *argv[]){ return NSApplicationMain(argc, (const char **) argv);}&nbsp;&nbsp;应用程序主进程开启&nbsp;通过Info.plist 查找&nbsp;NSMainNibFile，并load之NSMainNibFile 文件Load完成后，下一步NibFile中"File's owner' 回调用awakeFromNib10.6 之后支持[super awakeFromNib]程序启动完成程序状态管理和维护通过NSApplication，NSApplicationDelegate&nbsp;NSNibLoading，单独load使用NSBundle 3个方法&nbsp;&nbsp;+ (BOOL)loadNibFile:(NSString *)fileName externalNameTable:(NSDictionary *)context withZone:(NSZone *)zone;+ (BOOL)loadNibNamed:(NSString *)nibName owner:(id)owner;- (BOOL)loadNibFile:(NSString *)fileName externalNameTable:(NSDictionary *)context withZone:(NSZone *)zone;看起来第二个更简单些&nbsp;&nbsp;另外Document base Application NSDocument 类可以使用-...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MacGeeks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Macintosh" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="nswindowcontrollernsdocumentloadnibfilensbundleawakefromnib" label="NSWindowController NSDocument loadNibFile NSBundle awakeFromNib" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[程序如何运行？<div>&nbsp; 入口main函数</div><div>&nbsp;&nbsp;<span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 12px; color: rgb(0, 0, 0); "><table style="width: 900px; background-color: rgb(241, 245, 249); border-collapse: collapse; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(199, 207, 213); border-right-color: rgb(199, 207, 213); border-bottom-color: rgb(199, 207, 213); border-left-color: rgb(199, 207, 213); padding-bottom: 4px; "><tbody><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; ">#import &lt;Cocoa/Cocoa.h&gt;<span style="margin-right: 0.667em; float: right; "></span></pre></td></tr><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; "> <span style="margin-right: 0.667em; float: right; "></span></pre></td></tr><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; ">int main(int argc, char *argv[])<span style="margin-right: 0.667em; float: right; "></span></pre></td></tr><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; ">{<span style="margin-right: 0.667em; float: right; "></span></pre></td></tr><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; ">    return NSApplicationMain(argc,  (const char **) argv);<span style="margin-right: 0.667em; float: right; "></span></pre></td></tr><tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: rgb(255, 255, 255); "><td scope="row" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><pre style="margin-top: -0.083em; margin-bottom: 0px; font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); margin-right: 0.333em; margin-left: 0.5em; line-height: 13px; white-space: pre-wrap; ">}</pre></td></tr></tbody></table></span><div>&nbsp;&nbsp;</div></div><div>应用程序主进程开启</div><div>&nbsp;通过<span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Courier, Consolas, monospace; ">Info.plist 查找&nbsp;</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); "><code style="font-size: 13px; font-family: Courier, Consolas, monospace; color: rgb(102, 102, 102); ">NSMainNibFile，并load之</code></span></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Courier, Consolas, monospace; ">NSMainNibFile 文件Load完成后，下一步</span><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Courier, Consolas, monospace; ">NibFile中"File's owner' 回调用</span><span class="Apple-style-span" style="font-family: Menlo; font-size: 18px; ">awakeFromNib</span></div><div><span class="Apple-style-span" style="font-family: Menlo; font-size: 18px; ">10.6 之后支持</span><span class="Apple-style-span" style="color: rgb(0, 133, 23); font-family: Menlo; font-size: 18px; ">[super awakeFromNib]</span></div><div><font class="Apple-style-span" color="#008517" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'; color: #d22723">程序启动完成</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'; color: #d22723">程序状态管理和维护通过</p></font><span class="Apple-style-span" style="color: rgb(210, 39, 35); font-family: Menlo; font-size: 18px; ">NSApplication，</span><font class="Apple-style-span" color="#008517" face="Menlo" size="4"><span class="Apple-style-span" style="color: rgb(210, 39, 35); font-size: 18px; ">NSApplicationDelegate&nbsp;</span></font></div><div><font class="Apple-style-span" color="#d22723" face="Menlo" size="4"><br /></font></div><div><font class="Apple-style-span" color="#d22723" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">NSNibLoading，单独load</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">使用NSBundle 3个方法</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp;</p><p></p></font><font class="Apple-style-span" color="#008517" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'; color: #d22723"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">+ (<span style="color: #bd23a0">BOOL</span>)loadNibFile:(<span style="color: #743aa7">NSString</span> *)fileName externalNameTable:(<span style="color: #743aa7">NSDictionary</span> *)context withZone:(<span style="color: #743aa7">NSZone</span> *)zone;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">+ (<span style="color: #bd23a0">BOOL</span>)loadNibNamed:(<span style="color: #743aa7">NSString</span> *)nibName owner:(<span style="color: #bd23a0">id</span>)owner;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">BOOL</span>)loadNibFile:(<span style="color: #743aa7">NSString</span> *)fileName externalNameTable:(<span style="color: #743aa7">NSDictionary</span> *)context withZone:(<span style="color: #743aa7">NSZone</span> *)zone;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'">看起来第二个更简单些</p></p></font><font class="Apple-style-span" color="#008517" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'; color: #d22723"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'"><span style="font: 18.0px Menlo">&nbsp;&nbsp;</span></p><p></p><p></p></font><font class="Apple-style-span" face="Menlo" size="4"><br /></font><font class="Apple-style-span" color="#008517" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px 'Heiti SC Light'; color: #d22723">另外Document base Application NSDocument 类可以使用</p></font></div><div><font class="Apple-style-span" face="Menlo" size="4"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #743aa7">NSString</span> *)windowNibName;方法加载目标Nib文件</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7">NSWindowController 同样可以使用上面的这个方法</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><br /></p></p></font></div><div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>AppKit 一点笔记(二)</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/appkit-1.html" />
    <id>tag:iphone.ipsw.info,2011://3.382</id>

    <published>2011-11-15T02:27:41Z</published>
    <updated>2011-11-15T02:48:59Z</updated>

    <summary><![CDATA[1 Dock Menu 效果如图实现方法NSApplicationDelegate实现- (NSMenu *)applicationDockMenu:(NSApplication *)sender { &nbsp; &nbsp; return _menu; }2 状态条菜单&nbsp; 需要NSMenuDelegate protocol@protocol NSMenuDelegate &lt;NSObject&gt; @optional - (void)menuNeedsUpdate:(NSMenu*)menu; - (NSInteger)numberOfItemsInMenu:(NSMenu*)menu; - (BOOL)menu:(NSMenu*)menu updateItem:(NSMenuItem*)item atIndex:(NSInteger)index shouldCancel:(BOOL)shouldCancel;- (void)menuWillOpen:(NSMenu *)menu; - (void)menuDidClose:(NSMenu *)menu;- (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item;@end给StatusBar加Icon- (void)activateStatusMenu:(int)status { &nbsp;...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="nsstatusbarnsmenunsmenudelegatensapplicationdelegate" label="NSStatusBar NSMenu NSMenuDelegate NSApplicationDelegate" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<div>1 Dock Menu 效果如图</div><img alt="dock_menu.png" src="http://iphone.ipsw.info/2011/11/15/dock_menu.png" width="158" height="314" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /><div>实现方法</div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7">NSApplicationDelegate</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7">实现</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #743aa7">NSMenu</span> *)applicationDockMenu:(<span style="color: #743aa7">NSApplication</span> *)sender</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">return</span> <span style="color: #4e8187">_menu</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">2 状态条菜单</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; 需要NSMenuDelegate protocol</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span style="color: #bd23a0">@protocol</span> NSMenuDelegate &lt;<span style="color: #743aa7">NSObject</span>&gt;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@optional</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)menuNeedsUpdate:(<span style="color: #743aa7">NSMenu</span>*)menu;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #743aa7">NSInteger</span>)numberOfItemsInMenu:(<span style="color: #743aa7">NSMenu</span>*)menu;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">BOOL</span>)menu:(<span style="color: #743aa7">NSMenu</span>*)menu updateItem:(<span style="color: #743aa7">NSMenuItem</span>*)item atIndex:(<span style="color: #743aa7">NSInteger</span>)index shouldCancel:(<span style="color: #bd23a0">BOOL</span>)shouldCancel;</p><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)menuWillOpen:(<span style="color: #743aa7">NSMenu</span> *)menu;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)menuDidClose:(<span style="color: #743aa7">NSMenu</span> *)menu;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)menu:(<span style="color: #743aa7">NSMenu</span> *)menu willHighlightItem:(<span style="color: #743aa7">NSMenuItem</span> *)item;</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">@end</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p></p></div></p><img alt="statbar_menu.png" src="http://iphone.ipsw.info/2011/11/15/statbar_menu.png" width="200" height="263" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></p></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">给<span class="Apple-style-span" style="color: rgb(116, 58, 167); ">StatusBar加Icon</span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)activateStatusMenu:(<span style="color: #bd23a0">int</span>)status</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000">&nbsp; &nbsp; </span>NSStatusBar<span style="color: #000000"> *bar = [</span>NSStatusBar<span style="color: #000000"> </span><span style="color: #411a7f">systemStatusBar</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><span class="Apple-tab-span" style="white-space:pre">	</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #78482d"><span style="color: #000000">&nbsp; &nbsp; </span><span style="color: #4e8187">icon</span><span style="color: #000000"> = [bar </span><span style="color: #411a7f">statusItemWithLength</span><span style="color: #000000">:</span>NSVariableStatusItemLength<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; [<span style="color: #4e8187">icon</span> <span style="color: #411a7f">retain</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #743aa7">NSString</span>* filePath;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #bd23a0">switch</span> (status) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">		</span><span style="color: #bd23a0">case</span> <span style="color: #3724d4">0</span>:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span>filePath = [[</span><span style="color: #743aa7">NSBundle</span><span style="color: #000000"> </span>mainBundle<span style="color: #000000">] </span>pathForResource<span style="color: #000000">:</span><span style="color: #d22723">@"sync_complete"</span><span style="color: #000000"> </span>ofType<span style="color: #000000">:</span><span style="color: #d22723">@"png"</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span></span>break<span style="color: #000000">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">		</span><span style="color: #bd23a0">case</span> <span style="color: #3724d4">1</span>:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span>filePath = [[</span><span style="color: #743aa7">NSBundle</span><span style="color: #000000"> </span>mainBundle<span style="color: #000000">] </span>pathForResource<span style="color: #000000">:</span><span style="color: #d22723">@"sync_processing"</span><span style="color: #000000"> </span>ofType<span style="color: #000000">:</span><span style="color: #d22723">@"png"</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span></span>break<span style="color: #000000">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">		</span><span style="color: #bd23a0">case</span> <span style="color: #3724d4">2</span>:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span>filePath = [[</span><span style="color: #743aa7">NSBundle</span><span style="color: #000000"> </span>mainBundle<span style="color: #000000">] </span>pathForResource<span style="color: #000000">:</span><span style="color: #d22723">@"sync_error"</span><span style="color: #000000"> </span>ofType<span style="color: #000000">:</span><span style="color: #d22723">@"png"</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span></span>break<span style="color: #000000">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span></span>default<span style="color: #000000">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span></span>break<span style="color: #000000">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #743aa7">NSImage</span>* image = [[<span style="color: #743aa7">NSImage</span> <span style="color: #411a7f">alloc</span>] <span style="color: #411a7f">initWithContentsOfFile</span>:filePath];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>[<span style="color: #4e8187">icon</span> <span style="color: #411a7f">setImage</span>:image];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[</span><span style="color: #4e8187">icon</span><span style="color: #000000"> </span>setHighlightMode<span style="color: #000000">:</span><span style="color: #bd23a0">YES</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #4e8187"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[</span>icon<span style="color: #000000"> </span><span style="color: #411a7f">setMenu</span><span style="color: #000000">:</span>mainMenu<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">关于菜单就讲这么多</p></div>]]>
        
    </content>
</entry>

<entry>
    <title>AppKit 一点笔记</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/appkit.html" />
    <id>tag:iphone.ipsw.info,2011://3.381</id>

    <published>2011-11-11T07:49:28Z</published>
    <updated>2011-11-11T07:54:44Z</updated>

    <summary><![CDATA[NSWindowController- (id)initWithWindow:(NSWindow *)window或者使用&nbsp;- (NSString *)windowNibNameNSWindowController *controller = [[c alloc] init]; &nbsp; &nbsp; if (_windowControllers == nil) { &nbsp; &nbsp; &nbsp; &nbsp; _windowControllers = [NSMutableArray new]; &nbsp; &nbsp; } &nbsp; &nbsp; [_windowControllers addObject:controller]; &nbsp; &nbsp; [controller showWindow:self];//显示Window,self 为NSWindowController &nbsp; &nbsp; [controller...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="Coding" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Macintosh" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="applicationkit" label="Application Kit" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="graphicsubsystems" label="Graphic Subsystems" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="macosx" label="Mac OS X" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="operatingsystem" label="Operating system" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">NSWindowController</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">id</span>)initWithWindow:(<a class="zem_slink" href="http://en.wikipedia.org/wiki/Application_Kit" title="Application Kit" rel="wikipedia">NSWindow</a> *)window</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">或者使用&nbsp;- (NSString *)windowNibName</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">NSWindowController *controller = [[c alloc] init];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">if</span> (_windowControllers == <span style="color: #bd23a0">nil</span>) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; _windowControllers = [NSMutableArray new];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; [_windowControllers addObject:controller];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; [controller showWindow:<span style="color: #bd23a0">self</span>];//显示Window,self 为NSWindowController</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; [controller release];</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">注册窗口关闭通知</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp;&nbsp;[[NSNotificationCenter defaultCenter] addObserver:<span style="color: #bd23a0">self</span> selector:<span style="color: #bd23a0">@selector</span>(_windowClosed:) name:NSWindowWillCloseNotification object:<span style="color: #bd23a0">nil</span>];</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">处理关闭窗口通知，移出不需要的Window</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)_windowClosed:(NSNotification *)note {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; NSWindow *window = [note object];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">for</span> (NSWindowController *winController <span style="color: #bd23a0">in</span> _windowControllers) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bd23a0">if</span> (winController.window == window) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517"><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [[winController retain] autorelease]; </span>// Keeps the instance alive a little longer so things can unbind from it</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_windowControllers removeObject:winController];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #bd23a0">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p><p></p><p></p><p></p>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=9b13f109-0278-450d-834d-1a4e911a39a1" alt="Enhanced by Zemanta" style="border:none;float:right" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>sysctl on iOS5 </title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/11/sysctl-on-ios5.html" />
    <id>tag:iphone.ipsw.info,2011://3.380</id>

    <published>2011-11-06T01:52:55Z</published>
    <updated>2011-11-06T02:03:27Z</updated>

    <summary><![CDATA[iPhone4.txtiPad2.txt&nbsp;iPhone4s.txtSee iPhone4s hardware &nbsp;info&nbsp;hw.machine = iPhone4,1hw.model = N94APhw.ncpu = 2hw.byteorder = 1234hw.physmem = 529481728hw.usermem = 447721472hw.pagesize = 4096hw.epoch = 1hw.vectorunit = 0hw.busfrequency = 200000000hw.cpufrequency = 800000000hw.cachelinesize = 32hw.l1icachesize = 32768hw.l1dcachesize = 32768hw.l2settings = 1hw.l2cachesize = 1048576hw.tbfrequency = 24000000hw.memsize = 529481728hw.availcpu...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="applea4" label="Apple A4" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="applea5" label="Apple A5" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="handhelds" label="Handhelds" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ios" label="ios" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ipad" label="IPad" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="IPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="itunes" label="ITunes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="siri" label="Siri" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="smartphones" label="Smartphones" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<a href="http://iphone.ipsw.info/2011/11/06/iPhone4.txt">iPhone4.txt</a><div><br /></div><div><a href="http://iphone.ipsw.info/2011/11/06/iPad2.txt">iPad2.txt</a>&nbsp;</div><div><br /></div><div><a href="http://iphone.ipsw.info/2011/11/06/iPhone4s.txt">iPhone4s.txt</a></div><div><br /></div><div>See iPhone4s hardware &nbsp;info&nbsp;</div><div><br /></div><div><div>hw.machine = iPhone4,1</div><div>hw.model = N94AP</div><div>hw.ncpu = 2</div><div>hw.byteorder = 1234</div><div>hw.physmem = 529481728</div><div>hw.usermem = 447721472</div><div>hw.pagesize = 4096</div><div>hw.epoch = 1</div><div>hw.vectorunit = 0</div><div>hw.busfrequency = 200000000</div><div>hw.cpufrequency = 800000000</div><div>hw.cachelinesize = 32</div><div>hw.l1icachesize = 32768</div><div>hw.l1dcachesize = 32768</div><div>hw.l2settings = 1</div><div>hw.l2cachesize = 1048576</div><div>hw.tbfrequency = 24000000</div><div>hw.memsize = 529481728</div><div>hw.availcpu = 2</div><div><br /></div><div>开发中使用了&nbsp;http://opensource.apple.com/ 开发的项目 system_cmds 中sysctl&nbsp;</div><div><br /></div></div><div><br /></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=3f993ac9-7b6b-4e13-ba9d-c1d64d56cf55" alt="Enhanced by Zemanta" style="border:none;float:right" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Steven P. Jobs 1955-2011</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/10/steven-p-jobs-1955-2011.html" />
    <id>tag:iphone.ipsw.info,2011://3.379</id>

    <published>2011-10-06T14:40:19Z</published>
    <updated>2011-10-06T14:47:41Z</updated>

    <summary>苹果失去了一位富有远见和创造力的天才，世界失去了一位神人。我们这些有幸认识史蒂夫并与之公事的人们，失去了一位亲爱的朋友和激励我们的精神导师。史蒂夫留下了一个只有他才能开创的公司，他的精神将永远是苹果的基石。（苹果官网，孙方翻译）...</summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
        <category term="Apple" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="stevenjobs" label="Steven Jobs" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<div><br /></div><div><br /></div><a href="http://iphone.ipsw.info/2011/10/06/IMG_0002.jpg"><img alt="IMG_0002.jpg" src="http://iphone.ipsw.info/assets_c/2011/10/IMG_0002-thumb-480x320-117.jpg" width="480" height="320" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a><div>苹果失去了一位富有远见和创造力的天才，世界失去了一位神人。我们这些有幸认识史蒂夫并与之公事的人们，失去了一位亲爱的朋友和激励我们的精神导师。史蒂夫留下了一个只有他才能开创的公司，他的精神将永远是苹果的基石。（苹果官网，孙方翻译）</div>]]>
        <![CDATA[<a href="http://iphone.ipsw.info/assets_c/2011/10/IMG_0019-119.html" onclick="window.open('http://iphone.ipsw.info/assets_c/2011/10/IMG_0019-119.html','popup','width=1024,height=683,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://iphone.ipsw.info/assets_c/2011/10/IMG_0019-thumb-480x320-119.jpg" width="480" height="320" alt="IMG_0019.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a><div><div style="text-align: center;"><font class="Apple-style-span" color="#0000ee"><u><a href="http://iphone.ipsw.info/assets_c/2011/10/NanJing_East-122.html" onclick="window.open('http://iphone.ipsw.info/assets_c/2011/10/NanJing_East-122.html','popup','width=1024,height=683,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://iphone.ipsw.info/assets_c/2011/10/NanJing_East-thumb-480x320-122.jpg" width="480" height="320" alt="NanJing_East.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></u></font></div><div style="text-align: center;"><font class="Apple-style-span" color="#0000ee"><a href="http://iphone.ipsw.info/assets_c/2011/10/HK_Plazza-125.html" onclick="window.open('http://iphone.ipsw.info/assets_c/2011/10/HK_Plazza-125.html','popup','width=1024,height=683,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://iphone.ipsw.info/assets_c/2011/10/HK_Plazza-thumb-480x320-125.jpg" width="480" height="320" alt="HK_Plazza.jpg" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></font></div><div><br /></div></div>]]>
    </content>
</entry>

<entry>
    <title>KVC/KVO and notification sample code</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/09/kvckvo-and-notification-sample-code.html" />
    <id>tag:iphone.ipsw.info,2011://3.378</id>

    <published>2011-09-27T02:01:14Z</published>
    <updated>2011-09-27T02:03:22Z</updated>

    <summary><![CDATA[#pragma mark KVO - (void)observeValueForKeyPath:(NSString *)keyPath &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ofObject:(id)object &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; change:(NSDictionary *)change &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...]]></summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    <category term="ios" label="iOS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="IPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="objectoriented" label="Object-Oriented" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="objectivec" label="Objective-C" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #78482d">#pragma mark KVO</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">- (<span style="color: #bd23a0">void</span>)observeValueForKeyPath:(<span style="color: #743aa7">NSString</span> *)keyPath</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ofObject:(<span style="color: #bd23a0">id</span>)object</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; change:(<span style="color: #743aa7">NSDictionary</span> *)change</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context:(<span style="color: #bd23a0">void</span> *)context</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #d22723"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span></span><span style="color: #411a7f">NSLog</span><span style="color: #000000">(</span>@"dict= %@ obj= %@,keypath=%@"<span style="color: #000000">,change,object,keyPath);</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; if (object ==xxx) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; &nbsp; &nbsp; if ([keyPath isEqualToString:@"title"]) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; &nbsp; &nbsp; }else if ([keyPath isEqualToString:@"name"]) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; } else if(object == bbb){</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">//&nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; <span style="color: #bd23a0">if</span> (context == <span style="color: #3724d4">123</span>) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; } <span style="color: #bd23a0">else</span> <span style="color: #bd23a0">if</span>(context == <span style="color: #3724d4">456</span>){</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; }</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px">&nbsp;&nbsp; &nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">void</span>)traceObj:(<span style="color: #4e8187">Entry</span>*)obj</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[obj </span>addObserver<span style="color: #000000">:</span><span style="color: #bd23a0">self</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span>&nbsp; </span>forKeyPath<span style="color: #000000">:</span><span style="color: #d22723">@"title"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span> </span>options<span style="color: #000000">:</span><span style="color: #3724d4">0</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">			</span> <span style="color: #411a7f">context</span>:<span style="color: #3724d4">123</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000">&nbsp; &nbsp; [obj </span>addObserver<span style="color: #000000">:</span><span style="color: #bd23a0">self</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span>&nbsp; </span>forKeyPath<span style="color: #000000">:</span><span style="color: #d22723">@"name"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span> </span>options<span style="color: #000000">:</span><span style="color: #3724d4">0</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">			</span> <span style="color: #411a7f">context</span>:<span style="color: #3724d4">456</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">&nbsp; &nbsp; [objB <span style="color: #411a7f">addObserver</span>:<span style="color: #bd23a0">self</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span>&nbsp; </span>forKeyPath<span style="color: #000000">:</span><span style="color: #d22723">@"name"</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">			</span> </span>options<span style="color: #000000">:</span><span style="color: #3724d4">0</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">			</span> <span style="color: #411a7f">context</span>:<span style="color: #bd23a0">NULL</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}<span class="Apple-tab-span" style="white-space:pre">	</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #008517">// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">void</span>)viewDidLoad</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[</span><span style="color: #bd23a0">super</span><span style="color: #000000"> </span>viewDidLoad<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><span class="Apple-tab-span" style="white-space:pre">	</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #4e8187">Entry</span> *entry =[[<span style="color: #4e8187">Entry</span> <span style="color: #411a7f">alloc</span>] <span style="color: #411a7f">init</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>[<span style="color: #bd23a0">self</span> <span style="color: #31595d">traceObj</span>:entry];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[entry </span>setValue<span style="color: #000000">:</span><span style="color: #d22723">@"abc"</span><span style="color: #000000"> </span>forKey<span style="color: #000000">:</span><span style="color: #d22723">@"title"</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #bd23a0">id</span> msg=[entry <span style="color: #411a7f">valueForKey</span>:<span style="color: #d22723">@"titl"</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #411a7f">NSLog</span>(<span style="color: #d22723">@"%@"</span>,msg);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[[</span><span style="color: #743aa7">NSNotificationCenter</span><span style="color: #000000"> </span>defaultCenter<span style="color: #000000">] </span>addObserver<span style="color: #000000">:</span><span style="color: #bd23a0">self</span><span style="color: #000000">&nbsp;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> <span style="color: #411a7f">selector</span>:<span style="color: #bd23a0">@selector</span>(keyboardShow:)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">												</span> </span><span style="color: #411a7f">name</span><span style="color: #000000">:</span>UIKeyboardWillShowNotification<span style="color: #000000">&nbsp;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> &nbsp; <span style="color: #411a7f">object</span>:<span style="color: #bd23a0">nil</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[[</span><span style="color: #743aa7">NSNotificationCenter</span><span style="color: #000000"> </span>defaultCenter<span style="color: #000000">] </span>addObserver<span style="color: #000000">:</span><span style="color: #bd23a0">self</span><span style="color: #000000">&nbsp;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> <span style="color: #411a7f">selector</span>:<span style="color: #bd23a0">@selector</span>(keyboardShow:)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">												</span> </span><span style="color: #411a7f">name</span><span style="color: #000000">:</span>UIKeyboardWillHideNotification</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> &nbsp; <span style="color: #411a7f">object</span>:<span style="color: #bd23a0">nil</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span>[[</span><span style="color: #743aa7">NSNotificationCenter</span><span style="color: #000000"> </span>defaultCenter<span style="color: #000000">] </span>addObserver<span style="color: #000000">:</span><span style="color: #bd23a0">self</span><span style="color: #000000">&nbsp;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> <span style="color: #411a7f">selector</span>:<span style="color: #bd23a0">@selector</span>(textChanged:)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">												</span> </span><span style="color: #411a7f">name</span><span style="color: #000000">:</span>UITextFieldTextDidChangeNotification</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">											</span> &nbsp; <span style="color: #411a7f">object</span>:<span style="color: #bd23a0">nil</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">void</span>)textChanged:(<span style="color: #743aa7">NSNotification</span>*)noti</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #411a7f">NSLog</span>(<span style="color: #d22723">@"%@ %@"</span>,<span style="color: #4e8187">input</span>.<span style="color: #743aa7">text</span>,[noti <span style="color: #411a7f">userInfo</span>]);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span></span>NSString<span style="color: #000000"> *sTr =</span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>text<span style="color: #000000">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span><span style="color: #bd23a0">if</span> ([sTr <span style="color: #411a7f">length</span>] &gt;=<span style="color: #3724d4">10</span>) {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span></span><span style="color: #4e8187">input</span><span style="color: #000000">.</span><span style="color: #743aa7">text</span><span style="color: #000000"> = [sTr </span>substringWithRange<span style="color: #000000">:</span>NSMakeRange<span style="color: #000000">(</span><span style="color: #3724d4">0</span><span style="color: #000000">,</span><span style="color: #3724d4">9</span><span style="color: #000000">)];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #411a7f"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span></span><span style="color: #743aa7">UIAlertView</span><span style="color: #000000"> *alert=[[[</span><span style="color: #743aa7">UIAlertView</span><span style="color: #000000"> </span>alloc<span style="color: #000000">] </span>initWithTitle<span style="color: #000000">:</span><span style="color: #d22723">@"title"</span><span style="color: #000000"> </span>message<span style="color: #000000">:</span><span style="color: #d22723">@"message"</span><span style="color: #000000"> </span>delegate<span style="color: #000000">:</span><span style="color: #bd23a0">self</span><span style="color: #000000"> </span>cancelButtonTitle<span style="color: #000000">:</span><span style="color: #d22723">@"ok"</span><span style="color: #000000"> </span>otherButtonTitles<span style="color: #000000">:</span><span style="color: #d22723">@"2"</span><span style="color: #000000">,</span><span style="color: #d22723">@"cancel"</span><span style="color: #000000">,</span><span style="color: #bd23a0">nil</span><span style="color: #000000">] </span>autorelease<span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">		</span>[alert <span style="color: #411a7f">show</span>];</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><span class="Apple-tab-span" style="white-space:pre">	</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span></span>NSMutableArray<span style="color: #000000"> *array=[[</span>NSMutableArray<span style="color: #000000"> </span><span style="color: #411a7f">alloc</span><span style="color: #000000">] </span><span style="color: #411a7f">initWithCapacity</span><span style="color: #000000">:</span><span style="color: #3724d4">10</span><span style="color: #000000">];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">void</span>)keyboardShow:(<span style="color: #743aa7">NSNotification</span>*)noti</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span></span><span style="color: #bd23a0">if</span><span style="color: #000000"> ([[noti </span><span style="color: #411a7f">name</span><span style="color: #000000">] </span><span style="color: #411a7f">isEqualToString</span><span style="color: #000000">:</span>UIKeyboardWillShowNotification<span style="color: #000000">]) {</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span></span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000"> = </span><span style="color: #411a7f">CGPointMake</span><span style="color: #000000">(</span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000">.</span>x<span style="color: #000000">, </span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000">.</span>y<span style="color: #000000">-</span><span style="color: #3724d4">200</span><span style="color: #000000">);</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>} <span style="color: #bd23a0">else</span> {</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #743aa7"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">		</span></span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000"> = </span><span style="color: #411a7f">CGPointMake</span><span style="color: #000000">(</span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000">.</span>x<span style="color: #000000">, </span><span style="color: #4e8187">input</span><span style="color: #000000">.</span>center<span style="color: #000000">.</span>y<span style="color: #000000">+</span><span style="color: #3724d4">200</span><span style="color: #000000">);</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">	</span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">######################################</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@implementation<span style="color: #000000"> Entry</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@synthesize<span style="color: #000000"> title;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@synthesize<span style="color: #000000"> price;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@synthesize<span style="color: #000000"> image53;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #bd23a0">@synthesize<span style="color: #000000"> image;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">id</span>)valueForUndefinedKey:(<span style="color: #743aa7">NSString</span> *)key</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #d22723"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">	</span></span><span style="color: #bd23a0">return</span><span style="color: #000000"> [</span><span style="color: #743aa7">NSString</span><span style="color: #000000"> </span><span style="color: #411a7f">stringWithFormat</span><span style="color: #000000">:</span>@"%@ not have value for key %@"<span style="color: #000000">,</span><span style="color: #bd23a0">self</span><span style="color: #000000">,key];</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">-(<span style="color: #bd23a0">void</span>)setValue:(<span style="color: #bd23a0">id</span>)value forUndefinedKey:(<span style="color: #743aa7">NSString</span> *)key</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px"><span class="Apple-tab-span" style="white-space:pre">	</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo">}</p></p><div><br /></div> 

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=4f350458-aa14-46d0-96bb-cd3f710c1e6d" alt="Enhanced by Zemanta" style="border:none;float:right" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>东北老家小河</title>
    <link rel="alternate" type="text/html" href="http://iphone.ipsw.info/2011/09/home-river-mountain.html" />
    <id>tag:iphone.ipsw.info,2011://3.377</id>

    <published>2011-09-24T01:08:58Z</published>
    <updated>2011-09-24T01:17:54Z</updated>

    <summary>儿时夏季经常在河里游泳拍摄于2011年9.19 傍晚...</summary>
    <author>
        <name>孔祥波</name>
        
    </author>
    
    <category term="homerivermountain" label="home river mountain" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="zh-cn" xml:base="http://iphone.ipsw.info/">
        <![CDATA[儿时夏季经常在河里游泳<div>拍摄于2011年9.19 傍晚<br /><div><br /></div><div><a href="http://iphone.ipsw.info/2011/09/24/IMG_0189.jpg"><img alt="IMG_0189.jpg" src="http://iphone.ipsw.info/assets_c/2011/09/IMG_0189-thumb-480x358-115.jpg" width="480" height="358" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></div><div><br /></div></div>]]>
        
    </content>
</entry>

</feed>

