<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>以太之内 生存之上 &#187; apple</title> <atom:link href="http://ixhan.com/tag/apple/feed/" rel="self" type="application/rss+xml" /><link>http://ixhan.com</link> <description>Live in your world, get owned in mine</description> <lastBuildDate>Tue, 15 May 2012 04:08:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>[技术贴]苹果如何制造排队</title><link>http://ixhan.com/2011/05/how-do-apple-control-line-up-length/</link> <comments>http://ixhan.com/2011/05/how-do-apple-control-line-up-length/#comments</comments> <pubDate>Sun, 08 May 2011 07:36:31 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[新闻]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[ipad]]></category> <category><![CDATA[ipad2]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=554</guid> <description><![CDATA[<a
href="http://ixhan.com/2011/05/how-do-apple-control-line-up-length/" title="[技术贴]苹果如何制造排队"><img
width="267" height="200" src="http://ixhan.com/wp-content/uploads/2011/05/crowded_queue.png" class="attachment-extra-featured-image wp-post-image" alt="crowded_queue" title="crowded_queue" /></a>最近iPad2上市居然再次掀起排队热潮,和之前相比更是越来越火热.昨天甚至发生了三里屯的打架事件,相传苹果店员直接干翻了4位黄牛,最后价值30w的大门也被群众摧毁,于是店长宣布三里屯再次停业. 网上有说苹果也学国内公司租人排队,但我觉得下文的分析更可靠些,开始揭开苹果的另一个阴谋: 大家都知道苹果产品每每发布就排队抢购的事情. 往年iPod发布也这样,只是现在大家都有了所以就不去挣了. 而这个排队现象如何形成的呢? 首先如果只有几个人去买肯定形成不了排队, 而在心理学上叫做 Lining 效应 , 排队效应 . 而这个就是一种人性的弱点, 好比你看一个饭馆排队 下意识认为这个饭馆菜一定好吃. 如果你看到有人打架 围观人越多你会觉得事情越大. 之所以看热闹不嫌事儿大的道理. 苹果也将这种心理战运用到产品营销上. 首先当苹果要发布产品的时候会用尽各方人马通知人来到店购买. 并且通过店面摄像头与数据分析得出目前排队长度. 一般内部流程将人们的等待时间控制到45分钟到47分钟, 这个时间段是经过科学分析和实验的. 这个时间属于人们等待耐心的一个高峰. 在国内如果商家看到门口排了队伍首先就是要加快收银速度因为很多地方都是客户已经拿到物品等待付款. 如果时间超过19分钟人们就到了烦躁周期的第一波 会有26.4%的购物者选择不付款直接离开. 所以苹果将购物流程改为让购买者先不要得到物品, 实行一手交钱一手交货的销售方式来发挥排队效应. 一般在Apple Store所有的员工都有一个快速结算系统, 就是不管你在哪苹果的工作人员都可以帮你刷卡支付无需到款台. 当苹果需要创造排队效应的时候, 苹果按照数学模型来分析人群然后将在结算桌面上得出一个结算的时间. 这结算时间就是告诉结算的员工您需要浪费多长时间来结算一个客户. 比如如果外面有1000人排队 , 那苹果一般就只开1 到 3个收银台, &#8230;<p
class="read-more"><a
href="http://ixhan.com/2011/05/how-do-apple-control-line-up-length/">Read more &#187;</a></p>]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2011/05/how-do-apple-control-line-up-length/" title="[技术贴]苹果如何制造排队"><img
width="267" height="200" src="http://ixhan.com/wp-content/uploads/2011/05/crowded_queue.png" class="attachment-extra-featured-image wp-post-image" alt="crowded_queue" title="crowded_queue" /></a><p>最近iPad2上市居然再次掀起排队热潮,和之前相比更是越来越火热.昨天甚至发生了三里屯的打架事件,相传苹果店员直接干翻了4位黄牛,最后价值30w的大门也被群众摧毁,于是店长宣布三里屯再次停业.</p><p>网上有说苹果也学国内公司租人排队,但我觉得下文的分析更可靠些,开始揭开苹果的另一个阴谋:</p><p><a
href="http://ixhan.com/wp-content/uploads/2011/05/crowded_queue1.png"><img
class="alignnone size-full wp-image-556" title="crowded_queue" src="http://ixhan.com/wp-content/uploads/2011/05/crowded_queue1.png" alt="" width="480" height="359" /></a></p><p>大家都知道苹果产品每每发布就排队抢购的事情. 往年iPod发布也这样,只是现在大家都有了所以就不去挣了.<br
/> 而这个排队现象如何形成的呢?</p><p>首先如果只有几个人去买肯定形成不了排队, 而在心理学上叫做 Lining 效应 , 排队效应 .<br
/> 而这个就是一种人性的弱点, 好比你看一个饭馆排队 下意识认为这个饭馆菜一定好吃.</p><p>如果你看到有人打架 围观人越多你会觉得事情越大.<br
/> 之所以看热闹不嫌事儿大的道理. 苹果也将这种心理战运用到产品营销上.</p><p>首先当苹果要发布产品的时候会用尽各方人马通知人来到店购买. 并且通过店面摄像头与数据分析得出目前排队长度.<br
/> 一般内部流程将人们的等待时间控制到45分钟到47分钟, 这个时间段是经过科学分析和实验的. 这个时间属于人们等待耐心的一个高峰.</p><p>在国内如果商家看到门口排了队伍首先就是要加快收银速度因为很多地方都是客户已经拿到物品等待付款. 如果时间超过19分钟人们就到了烦躁周期的第一波 会有26.4%的购物者选择不付款直接离开.</p><p>所以苹果将购物流程改为让购买者先不要得到物品, 实行一手交钱一手交货的销售方式来发挥排队效应.<br
/> 一般在Apple Store所有的员工都有一个快速结算系统, 就是不管你在哪苹果的工作人员都可以帮你刷卡支付无需到款台.</p><p>当苹果需要创造排队效应的时候, 苹果按照数学模型来分析人群然后将在结算桌面上得出一个结算的时间.</p><p>这结算时间就是告诉结算的员工您需要浪费多长时间来结算一个客户. 比如如果外面有1000人排队 ,<br
/> 那苹果一般就只开1 到 3个收银台, 每个付款时间需要至少到 17分钟.</p><p>而一般结算时间只有55秒.</p><p>这样就造成了 货少难买现象, 而从人性弱点出发 , 越得不到的越好 , 越多人抢的越好 , 而人们也会计算时间成本, 就是已经排了47分钟 不在乎再排47分钟了.</p><p>而且当您付款后的时候 , 苹果一定会告诉您, 您终于拥有了您的xxxx产品, 只字不提我们已经拥有了你的钱的事情.</p><p>如这个事情搁小时候老人总给我说 把自己卖了还帮人数钱就是这个道理吧.</p><p>说得有点多 , 或许这套排队理论国内的厂商也可以在适当的时候运用一下 , 而不是花钱雇人来形成排队效果那是在是太没品味了.</p><blockquote><p>路人甲:有感触 我也纳闷为啥每次就开这么俩款台 其他人都外面欢迎<br
/> 坑爹啊</p></blockquote><p>[声明,本文转载自<a
target="_blank" href="http://macx.cn/a/a4000i1863782.htm" target="_blank">这里</a>]</p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2010/06/ibook-page-curl-animation/" title="iBook Page Curl Animation 翻页效果">iBook Page Curl Animation 翻页效果</a></li><li><a
href="http://ixhan.com/2010/05/app-store-sales-exposed/" title="App Store 销售调查报告[2010-5]">App Store 销售调查报告[2010-5]</a></li><li><a
href="http://ixhan.com/2010/05/now-or-never/" title="now or never">now or never</a></li><li><a
href="http://ixhan.com/2010/04/a-trick-of-webview-iphone/" title="WebView 小技巧">WebView 小技巧</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2011/05/how-do-apple-control-line-up-length/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>WebView 小技巧</title><link>http://ixhan.com/2010/04/a-trick-of-webview-iphone/</link> <comments>http://ixhan.com/2010/04/a-trick-of-webview-iphone/#comments</comments> <pubDate>Mon, 26 Apr 2010 07:55:38 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[iOS]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[trick]]></category> <category><![CDATA[webview]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=302</guid> <description><![CDATA[<a
href="http://ixhan.com/2010/04/a-trick-of-webview-iphone/" title="WebView 小技巧"></a>apple 把 webview 封装的实在太简单了. 留给开发者只有寥寥几个api,甚至连scrollview的基本操作都没法完成. 不过下面这个方法 stringByEvaluatingJavaScriptFromString:String 还是给了些希望. 搜索后发现果然javascript提供了一系列移动页面的操作 window.pageYOffset   获得当前页面的偏移 window.scrollTo(x,y) 将页面偏移到指定位置 这样我的需求就实现了.当然js能做的事情太多了,给webview换一套css也不是不可能的. 好像 Reeder 以及 便携百科ipad 就是这么做到的吧. 这两款软件都做得相当完美,体验上也无可挑剔.作者确实费了不少心血. 用心的产品才能引起共鸣. Related PostsApple 发疯了永远的扫雷英雄(开源) 登场栽大了之Objc过度释放对象Things I&#8217;ve done int past 5 months]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2010/04/a-trick-of-webview-iphone/" title="WebView 小技巧"></a><p>apple 把 webview 封装的实在太简单了.</p><p>留给开发者只有寥寥几个api,甚至连scrollview的基本操作都没法完成.</p><p>不过下面这个方法</p><blockquote><p>stringByEvaluatingJavaScriptFromString:String</p></blockquote><p>还是给了些希望.</p><p>搜索后发现果然javascript提供了一系列移动页面的操作</p><ul><li>window.pageYOffset   获得当前页面的偏移</li><li>window.scrollTo(x,y) 将页面偏移到指定位置</li></ul><p>这样我的需求就实现了.当然js能做的事情太多了,给webview换一套css也不是不可能的.</p><p>好像 Reeder 以及 便携百科ipad 就是这么做到的吧. 这两款软件都做得相当完美,体验上也无可挑剔.作者确实费了不少心血.</p><p>用心的产品才能引起共鸣.</p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2010/04/apple-such-a-bitch/" title="Apple 发疯了">Apple 发疯了</a></li><li><a
href="http://ixhan.com/2009/12/minesweeperever/" title="永远的扫雷英雄(开源) 登场">永远的扫雷英雄(开源) 登场</a></li><li><a
href="http://ixhan.com/2009/11/shit-on-objc-object-manager/" title="栽大了之Objc过度释放对象">栽大了之Objc过度释放对象</a></li><li><a
href="http://ixhan.com/2009/11/things-ive-done-in-past-5-months/" title="Things I&#8217;ve done int past 5 months">Things I&#8217;ve done int past 5 months</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2010/04/a-trick-of-webview-iphone/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Apple 发疯了</title><link>http://ixhan.com/2010/04/apple-such-a-bitch/</link> <comments>http://ixhan.com/2010/04/apple-such-a-bitch/#comments</comments> <pubDate>Fri, 09 Apr 2010 02:26:39 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[iOS]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[Flash]]></category> <category><![CDATA[google]]></category> <category><![CDATA[objective-c]]></category> <category><![CDATA[os4]]></category> <category><![CDATA[unity]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=297</guid> <description><![CDATA[<a
href="http://ixhan.com/2010/04/apple-such-a-bitch/" title="Apple 发疯了"></a>Apple 发布了 os4.0 新的Game Center -&#62; openFeint , Plus+ 等第三方平台怎么活下去。矛盾开始了 iAD -&#62; 公开指责 google ，又一个敌人 以及 3.3.1 3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. &#8230;<p
class="read-more"><a
href="http://ixhan.com/2010/04/apple-such-a-bitch/">Read more &#187;</a></p>]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2010/04/apple-such-a-bitch/" title="Apple 发疯了"></a><p>Apple 发布了 os4.0</p><p>新的Game Center -&gt; openFeint , Plus+ 等第三方平台怎么活下去。矛盾开始了</p><p>iAD -&gt; 公开指责 google ，又一个敌人</p><p>以及 3.3.1</p><blockquote><p>3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).</p></blockquote><p>这下 unity 和 即将来临的flash也被一棍打死了。</p><p><a
target="_blank" href="http://forum.unity3d.com/viewtopic.php?t=48795&amp;postdays=0&amp;postorder=asc&amp;start=0">unity3d 论坛火爆讨论</a></p><p>Adobe 目前在twitter上的声明 ：<a
target="_blank" href="http://twitter.com/Adobe" target="_blank">Adobe</a>We are looking into the new SDK language. We continue to develop Packager for iPhone OS which will debut in Flash <a
target="_blank" href="http://search.twitter.com/search?q=%23CS5" target="_blank">#CS5</a></p><p><a
target="_blank" href="http://www.cocos2d-iphone.org/archives/855">当然cocos2d 也赶紧来了个声明，哈哈不关我的事</a></p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2009/11/shit-on-objc-object-manager/" title="栽大了之Objc过度释放对象">栽大了之Objc过度释放对象</a></li><li><a
href="http://ixhan.com/project/opensource-before-2010/" title="10年之前">10年之前</a></li><li><a
href="http://ixhan.com/2010/04/a-trick-of-webview-iphone/" title="WebView 小技巧">WebView 小技巧</a></li><li><a
href="http://ixhan.com/2010/03/tutorial-of-kissxml-iphone/" title="Tutorial of  kissXML(iPhone)">Tutorial of  kissXML(iPhone)</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2010/04/apple-such-a-bitch/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>永远的扫雷英雄(开源) 登场</title><link>http://ixhan.com/2009/12/minesweeperever/</link> <comments>http://ixhan.com/2009/12/minesweeperever/#comments</comments> <pubDate>Thu, 24 Dec 2009 16:40:04 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[iOS]]></category> <category><![CDATA[Project]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[决定]]></category> <category><![CDATA[c]]></category> <category><![CDATA[cms]]></category> <category><![CDATA[编译]]></category> <category><![CDATA[game]]></category> <category><![CDATA[minesweeper]]></category> <category><![CDATA[minesweeperever]]></category> <category><![CDATA[opensource]]></category> <category><![CDATA[Rails]]></category> <category><![CDATA[Ruby]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=230</guid> <description><![CDATA[<a
href="http://ixhan.com/2009/12/minesweeperever/" title="永远的扫雷英雄(开源) 登场"></a>开源小游戏 永远的扫雷英雄 登场! 写这个游戏的目的就是想写个小教程,后来想想文字就算了,有问题直接留言或邮件更直接. 源码:http://github.com/xhan/minesweeperever 游戏介绍 MINE SWEEPER EVER是经典的扫雷iphone版本.你可以在app store上免费下载 Link 你可能可以学到什么 一个完整的游戏(片头,菜单,光卡,排行榜) 基本UIKIT界面的使用,手写和nib的混合 不同界面间传递消息 播放视频 简单游戏的状态机 UserDefault的使用和简单的排行榜 在编译之前 由于资源文件比较多,开场视频是大头,还有许多策划时涂鸦使用的ps文件,请移步下载 http://ixhan.com/kill/MineSweeperEver-Resource.zip 到当前目录并解压. 为什么写这个小游戏 半年前(May 2009)做毕业设计(PlutoCMS)的时候头昏脑涨,逐下载了iPhoneSDK把玩下,原意是测试下学校带宽并看看iPhone模拟器是什么样子的.结果控制不住看了 iPhone cookbook ,记得第一章有个教你嵌套绘制图层 和 响应手指点击的 两个片段 .于是就想到了由两个技术做个扫雷绰绰有余,两个晚上后做了个只能扫雷不能放置旗帜的半成品就撒手不管.继续回头研究俺的毕业设计了. 离职后的这段时间刚好有些空闲,决定把之前未完成的东西收尾,并开源给有需要的人.花费了一个下午修改完善了下之前的代码,又花了一个晚上和一个早上把其他东西(几个界面,排行榜)添加了上去.最后是UI方面,第一个晚上画了个logo,简单策划了下大概需要的素材,还找了美工朋友帮我画了个坑,可是第二天在ps中做素材发现还是无法掌控美术上的东西,干脆决定用windows上经典的界面. 等待9天后通过审核,然后在那天上海iphone会议上才在mars的真机上见到自己的程序(惭愧呀,iphone因经济危机被我卖了),感觉还不是特别糟糕.哈哈. 许多特性没来得及加上去: 互联网排行榜功能 退出保存当前状态功能 左右手不同界面 长按或双击添加/取消 旗帜功能 荣誉系统 ,包括炸死次数,成功次数,等等. &#8230;<p
class="read-more"><a
href="http://ixhan.com/2009/12/minesweeperever/">Read more &#187;</a></p>]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2009/12/minesweeperever/" title="永远的扫雷英雄(开源) 登场"></a><h2>开源小游戏 永远的扫雷英雄 登场!</h2><p>写这个游戏的目的就是想写个小教程,后来想想文字就算了,有问题直接留言或邮件更直接. <img
src='http://ixhan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>源码:<a
target="_blank" href="http://github.com/xhan/minesweeperever">http://github.com/xhan/minesweeperever</a></p><h2>游戏介绍</h2><p>MINE SWEEPER EVER是经典的扫雷iphone版本.你可以在app store上免费下载 <a
target="_blank" href="http://itunes.apple.com/us/app/minesweeperever/id345567798?mt=8">Link</a></p><p><a
href="http://ixhan.com/wp-content/uploads/2009/12/mainShot.jpg"><img
class="alignnone size-full wp-image-231" title="mainShot-MineSweeperEver" src="http://ixhan.com/wp-content/uploads/2009/12/mainShot.jpg" alt="mainShot-MineSweeperEver" width="320" height="460" /></a></p><h2>你可能可以学到什么</h2><ul><li>一个完整的游戏(片头,菜单,光卡,排行榜)</li><li>基本UIKIT界面的使用,手写和nib的混合</li><li>不同界面间传递消息</li><li>播放视频</li><li>简单游戏的状态机</li><li>UserDefault的使用和简单的排行榜</li></ul><h2>在编译之前</h2><p>由于资源文件比较多,开场视频是大头,还有许多策划时涂鸦使用的ps文件,请移步下载 <code>http://ixhan.com/kill/MineSweeperEver-Resource.zip</code> 到当前目录并解压.</p><h2>为什么写这个小游戏</h2><p>半年前(May 2009)做毕业设计(<a
href="http://ixhan.com/2009/10/plutocms-ruby-on-rails-cms/">PlutoCMS</a>)的时候头昏脑涨,逐下载了iPhoneSDK把玩下,原意是测试下学校带宽并看看iPhone模拟器是什么样子的.结果控制不住看了 iPhone cookbook ,记得第一章有个教你嵌套绘制图层 和 响应手指点击的 两个片段 .于是就想到了由两个技术做个扫雷绰绰有余,两个晚上后做了个只能扫雷不能放置旗帜的半成品就撒手不管.继续回头研究俺的毕业设计了.</p><p>离职后的这段时间刚好有些空闲,决定把之前未完成的东西收尾,并开源给有需要的人.花费了一个下午修改完善了下之前的代码,又花了一个晚上和一个早上把其他东西(几个界面,排行榜)添加了上去.最后是UI方面,第一个晚上画了个logo,简单策划了下大概需要的素材,还找了美工朋友帮我画了个坑,可是第二天在ps中做素材发现还是无法掌控美术上的东西,干脆决定用windows上经典的界面.</p><p>等待9天后通过审核,然后在那天上海iphone会议上才在mars的真机上见到自己的程序(惭愧呀,iphone因经济危机被我卖了),感觉还不是特别糟糕.哈哈.</p><p>许多特性没来得及加上去:</p><ul><li>互联网排行榜功能</li><li>退出保存当前状态功能</li><li>左右手不同界面</li><li>长按或双击添加/取消 旗帜功能</li><li>荣誉系统 ,包括炸死次数,成功次数,等等.</li></ul><p>不过作为一个简单的教程应该还是够了.可能再过几个月闲的没事会改改~.</p><p>源码:<a
target="_blank" href="http://github.com/xhan/minesweeperever">http://github.com/xhan/minesweeperever</a></p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2009/12/dec-review/" title="12月串烧-年轻人就要飘逸">12月串烧-年轻人就要飘逸</a></li><li><a
href="http://ixhan.com/2009/10/15th/" title="2009年10月15日">2009年10月15日</a></li><li><a
href="http://ixhan.com/downloads/" title="Downloads">Downloads</a></li><li><a
href="http://ixhan.com/2009/10/plutocms-ruby-on-rails-cms/" title="PlutoCMS! 基于ROR的内容管理系统">PlutoCMS! 基于ROR的内容管理系统</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2009/12/minesweeperever/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>栽大了之Objc过度释放对象</title><link>http://ixhan.com/2009/11/shit-on-objc-object-manager/</link> <comments>http://ixhan.com/2009/11/shit-on-objc-object-manager/#comments</comments> <pubDate>Thu, 26 Nov 2009 09:37:28 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[Coding]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[决定]]></category> <category><![CDATA[内存管理]]></category> <category><![CDATA[c]]></category> <category><![CDATA[objective-c]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=196</guid> <description><![CDATA[<a
href="http://ixhan.com/2009/11/shit-on-objc-object-manager/" title="栽大了之Objc过度释放对象"></a>事情是这样的,4个月前我写了份实现类似下拉框选择操作的界面. 一个月前,发现了这个View 在dealloc 会crash掉. 多次调试无果,上 devForum.apple.com 询问也无人问津. 今天决定再次调试下,还是没找到哪里出问题. 最后决定求助 cocoachina 上的现场观众 最后开始一行一行的注释代码做终极调试. 离谱的事情发现了,只要我创建一个名为 mainText 的 UILabel ,在dealloc 中程序就会crash ,改成其他名字无事.难道是apple的bug? 新写了个view测试了,还是没问题. 接着接着就发现了在dealloc方法中: [mainText release] ,mainText = nil; // NSLog(@"release %@",bgView); [bgView release]; // NSLog(@"release %@",originView); [originView release]; // NSLog(@"release %@",labelArray); [labelArray &#8230;<p
class="read-more"><a
href="http://ixhan.com/2009/11/shit-on-objc-object-manager/">Read more &#187;</a></p>]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2009/11/shit-on-objc-object-manager/" title="栽大了之Objc过度释放对象"></a><p>事情是这样的,4个月前我写了份实现类似下拉框选择操作的界面.<br
/> 一个月前,发现了这个View 在dealloc 会crash掉.<br
/> 多次调试无果,上 devForum.apple.com 询问也无人问津.<br
/> 今天决定再次调试下,还是没找到哪里出问题.<br
/> 最后决定求助 cocoachina 上的现场观众<br
/> 最后开始一行一行的注释代码做终极调试.</p><p>离谱的事情发现了,只要我创建一个名为 mainText 的 UILabel ,在dealloc 中程序就会crash ,改成其他名字无事.难道是apple的bug? 新写了个view测试了,还是没问题.</p><p>接着接着就发现了在dealloc方法中:<br
/> <code> [mainText release] ,mainText = nil;<br
/> //	NSLog(@"release %@",bgView);<br
/> [bgView release];<br
/> //	NSLog(@"release %@",originView);<br
/> [originView release];<br
/> //	NSLog(@"release %@",labelArray);<br
/> [labelArray release];<br
/> //	NSLog(@"release %@",mainText);<br
/> [mainText release];<br
/> </code><br
/> 该死的,不知道当时那根神经错了,居然释放了两次,当然出错咯.问题也解决了.</p><p>所以在确认释放对象的情况下一定要写成:<br
/> [instance release],instance = nil ;</p><p>个人经验是,对于objective-c的内存管理都是得经过磨练才出来的,前期多犯错误是好事情.<br
/> 当然我认识一个朋友 ,他不释放任何对象,因为反正关闭iPhone后系统会处理的.这种觉悟不是大部分程序员有的,大家还是稳步前进咯.</p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2009/12/minesweeperever/" title="永远的扫雷英雄(开源) 登场">永远的扫雷英雄(开源) 登场</a></li><li><a
href="http://ixhan.com/2010/04/apple-such-a-bitch/" title="Apple 发疯了">Apple 发疯了</a></li><li><a
href="http://ixhan.com/2009/12/dec-review/" title="12月串烧-年轻人就要飘逸">12月串烧-年轻人就要飘逸</a></li><li><a
href="http://ixhan.com/2009/11/things-ive-done-in-past-5-months/" title="Things I&#8217;ve done int past 5 months">Things I&#8217;ve done int past 5 months</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2009/11/shit-on-objc-object-manager/feed/</wfw:commentRss> <slash:comments>145</slash:comments> </item> <item><title>Things I&#8217;ve done int past 5 months</title><link>http://ixhan.com/2009/11/things-ive-done-in-past-5-months/</link> <comments>http://ixhan.com/2009/11/things-ive-done-in-past-5-months/#comments</comments> <pubDate>Thu, 19 Nov 2009 16:07:08 +0000</pubDate> <dc:creator>xhan</dc:creator> <category><![CDATA[iOS]]></category> <category><![CDATA[Life]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[c]]></category> <category><![CDATA[Flex]]></category> <category><![CDATA[png]]></category> <category><![CDATA[Project]]></category> <category><![CDATA[work]]></category> <guid
isPermaLink="false">http://ixhan.com/?p=184</guid> <description><![CDATA[<a
href="http://ixhan.com/2009/11/things-ive-done-in-past-5-months/" title="Things I&#039;ve done int past 5 months"></a>It&#8217;s awfully to say that Time is running out fast , but it really does. I&#8217;ve been working as a iPhone application developer for five months  ,devoting all my energy to my job . Thanks to company&#8217;s trust , now &#8230;<p
class="read-more"><a
href="http://ixhan.com/2009/11/things-ive-done-in-past-5-months/">Read more &#187;</a></p>]]></description> <content:encoded><![CDATA[<a
href="http://ixhan.com/2009/11/things-ive-done-in-past-5-months/" title="Things I&#039;ve done int past 5 months"></a><p>It&#8217;s awfully to say that Time is running out fast , but it really does.</p><p>I&#8217;ve been working as a iPhone application developer for five months  ,devoting all my energy to my job . Thanks to company&#8217;s trust , now I am the core architect and team leader of our small group .</p><p>We&#8217;ve redesigned most of default iPhone UI components which is  really a difficult job at first . After a several  days of hardworking  ,We released first custom components named &#8216;MeeTabBarController&#8217; , which is more powerful , flexible, and has ability to manage animations for each tabBar ,each container view&#8217;s opening animations and  closing animations. It really works great and appears amazing.</p><p>Since now We&#8217;ve achieved the custom NavigationController, which has more delegate methods , a incredible user interface  and animations. the custom alertView , the custom tableViewController , the custom spring board , the custom http-client for fetching remote data , etc .</p><p>It would be no exaggeration to say that our custom framework is just another lite version of Three20 .^^</p><p>Here is a Preview version of Our Project:</p><table
border="1"><tbody><tr><td>Name</td><td>Lines</td><td>Files</td></tr><tr><td>Third part header</td><td>2360</td><td>34</td></tr><tr><td>Third part Source</td><td>4916</td><td>38</td></tr><tr><td>Project Header</td><td>7222</td><td>170</td></tr><tr><td>Project Source</td><td>28330</td><td>173</td></tr><tr><td>Total</td><td>42828</td><td>415</td></tr><tr><td>Total Pngs</td><td></td><td>431</td></tr></tbody></table><p>Here is a snap shoot of our another application which had submitted to apple store and ready for sale .<br
/> It just a simple application that in order to test whether our designs and functions will be rejected or permitted by apple ,Thankfully ,after a mistake that was rejected by undocument api  ,It&#8217;s status came out to be  ready for sale finally.</p><p><img
class="alignleft" title="RateView" src="http://www.animationlife.net/blog/wp-content/uploads/2009/11/IMG_0072.jpg" alt="" width="192" height="276" /><img
class="alignleft" title="MainView" src="http://www.animationlife.net/blog/wp-content/uploads/2009/11/IMG_0073.jpg" alt="" width="192" height="276" /></p><p><br
class="clear"><br
/> You can search it by type its name &#8220;Grading&#8221; ,it&#8217;s also based on our custom framework and I cost 3 days to finish it.<br
/> Give a try and feel free to comment it  !(Note :  we put off the sale date of this application for the moment by some conditions)</p><h3  class="related_post_title">Related Posts</h3><ul
class="related_post"><li><a
href="http://ixhan.com/2010/03/tutorial-of-kissxml-iphone/" title="Tutorial of  kissXML(iPhone)">Tutorial of  kissXML(iPhone)</a></li><li><a
href="http://ixhan.com/2010/05/now-or-never/" title="now or never">now or never</a></li><li><a
href="http://ixhan.com/2010/02/what-is-ipad-all-about/" title="What is iPad All About?  ">What is iPad All About? </a></li><li><a
href="http://ixhan.com/2009/12/minesweeperever/" title="永远的扫雷英雄(开源) 登场">永远的扫雷英雄(开源) 登场</a></li></ul>]]></content:encoded> <wfw:commentRss>http://ixhan.com/2009/11/things-ive-done-in-past-5-months/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> </channel> </rss>
