﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-淋雨的博客-随笔分类-IOS</title><link>http://www.cppblog.com/inkcpp/category/18629.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 05 Jun 2012 00:48:10 GMT</lastBuildDate><pubDate>Tue, 05 Jun 2012 00:48:10 GMT</pubDate><ttl>60</ttl><item><title>一些iOS高效开源类库</title><link>http://www.cppblog.com/inkcpp/archive/2012/06/04/177421.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Mon, 04 Jun 2012 01:40:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/06/04/177421.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/177421.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/06/04/177421.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/177421.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/177421.html</trackback:ping><description><![CDATA[<p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">本站除标注[FW]和资讯文章外都为原创文章，转载请注:<br />转载来源:&nbsp;<a href="http://www.comingx.com/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">Coming X</a><br />原文链接:&nbsp;<a href="http://www.comingx.com/?p=1310" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">一些iOS高效开源类库</a><br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br /><br />因为iOS SDK相对比较底层，所以开发者就得受累多做一些体力活。不过幸运的是，有很多第三方的类库可以用来简化很多不必要的工作。笔者整理了一下在本人学习过程中用到的一些比较有用Objective-C开源类库，既是做一个总结，同时也希望通过这些分享，能提高各位的开发效率。<br /></p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://code.google.com/p/kissxml/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">KissXml</a>&#8212;&#8212;xml解析库<br />相关教程：http://www.iteye.com/topic/625849</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">http://sencho.blog.163.com/blog/static/83056228201151743110540/</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; ">很方便的一个xml解析器，支持Xpath查询。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://code.google.com/p/skpsmtpmessage/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">skpsmtpmessage</a>&#8212;&#8212;Quick SMTP邮件发送<br />svn checkout http://skpsmtpmessage.googlecode.com/svn/trunk/ skpsmtpmessage-read-only<br />github: &nbsp; &nbsp; &nbsp;&nbsp;git clone https://github.com/kailoa/iphone-smtp.git<br />相关教程：http://disanji.net/2011/01/28/skpsmtpmessage-open-source-framework/<br />skpsmtpmessage 是由Skorpiostech, Inc.为我们带来的一个SMTP协议的开源实现，使用Objective-c 实现，iOS系统的项目可以直接调用。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/stig/json-framework/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">jsonframework</a>&#8212;&#8212;JSON支持<br />相关教程：http://blog.csdn.net/xiaoguan2008/article/details/6732683<br />它是一个开源框架，基于BSD协议发布。由于json-framework是开放源代码的，当你需要使用它时你只需将json的源代码加入到你的工程中。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://allseeing-i.com/ASIHTTPRequest/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">ASIHttpRequest</a>&#8212;&#8212;HTTP Network库<br />ASIHttpRequest库极大的简化了网络通 信，提供更先进的工具，例如文件上传工具，重定向处理工具、验证工具、等等。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/jdg/MBProgressHUD" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">MBProgressHUD</a>&#8212;&#8212;进展指示符库<br />苹果的应用程序一般都会用一种优雅的，半透明的进度显示效果，不过这个API是不公开的，因此你要是用了，很可能被清除出AppStore。而 MBProgressHUD提供了一个替代方案，而且在用户角度上，实现的效果根本看不出和官方程序有什么差别。同时还提供了其他附加功能，比如虚拟进展 指示符，以及完成提示信息。整合到项目里也很容易，这里不细谈了。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://code.google.com/p/zxing/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">zxing</a>&#8212;&#8212;二维码扫描库<br />支持条形码/二维码扫描的图形处理库，这是一个java库，在android上的功能比较完整。同时该库也支持ios，但只能支持二位条形码的扫描。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/klazuka/Kal" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">kal</a>&#8212;&#8212;iPhone日历控件<br />一个类似于ios系统默认日历开源日历库，支持添加事件，自定义日历样式等功能。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/facebook/facebook-ios-sdk" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">Facebook iOS SDK</a>&#8212;&#8212;Facebook API类库<br />大体来讲就是iPhone上的Facebook login，完全支持Facebook Graph API和the older REST api。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://getsharekit.com/install/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">shareKit</a>&#8212;&#8212;分享库<br />相关demo：http://www.cocoachina.com/bbs/read.php?tid-71760.html<br />分享到开心，豆瓣，腾讯，新浪微博的api所用到的强大的分享库。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/rs/SDWebImage" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">SDWebImage</a>&#8212;&#8212;简化网络图片处理<br />用SDWebImage调用网站上的图片，跟本地调用内置在应用包里的图片一样简单。操作也很简单。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://code.google.com/p/gdata-objectivec-client/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">GData client</a>&#8212;&#8212;iPhone上所有Google相关服务的类库<br />名字就说明一切了。跟Google相关的，值得一提的是，这个项目很开放。有很多示例程序供下载。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="http://code.google.com/p/core-plot/" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">CorePlot</a>&#8212;&#8212;2D图形绘图仪<br />CorePlot有很多解决方案将你的数据可视。同时也会提供各种迷人的图形效果，比如棒状图、饼状图、线状图等等，在他们网站上也提供了大量的范例图形，很多股票价格应用，游戏分数，个人财务管理都在用。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><a href="https://github.com/facebook/three20" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">Three20</a>&#8212;&#8212;类似于Facebook的优秀的UI库<br />Three20类库是Facebook自己做的，大而全是他最大的特色。把他整合到已有的项目中可能得费点周折，不过如果一开始你就用上了Three20，尤其是牵扯到很多web相关的项目的时候，你就能深刻体会到神马叫给力了。</p><p style="margin: 13px 0px; padding: 0px; color: #444444; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><strong style="margin: 0px; padding: 0px; font-family: 'Lucida Grande', 'Lucida Sans', 'Lucida Sans Unicode', Verdana, Helvetica, Arial, sans-serif; ">2011.9.5 更新</strong><br /><a href="https://github.com/ccgus/fmdb" style="margin: 0px; padding: 0px; color: #bb4411; text-decoration: none; ">FMDatabase</a>&#8212;&#8212;SQLite的Objective-C封装<br />是SQLite的C API對初學者來說實在太麻煩太瑣碎，難度太高。FMDB說穿了其實只是把C API包裝成簡單易用的Objective-C类。對于SQLite初學者來說，大大減低了上手的難度。有了FMDB，寫程式時只要專心在SQLite的語法上，而不用去理那堆有看沒有懂的C API，實在是件快樂的事情。</p><img src ="http://www.cppblog.com/inkcpp/aggbug/177421.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-06-04 09:40 <a href="http://www.cppblog.com/inkcpp/archive/2012/06/04/177421.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPhone游戏开发新手不容错过的资源分享</title><link>http://www.cppblog.com/inkcpp/archive/2012/05/11/174535.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Fri, 11 May 2012 01:15:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/05/11/174535.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/174535.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/05/11/174535.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/174535.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/174535.html</trackback:ping><description><![CDATA[<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">游戏邦注：本文作者为Juuso，文章为iPhone游戏开发新手提供了系列资源。</p><div id="attachment_27352"  aligncenter"="" style="margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; width: 510px; "><a href="http://gamerboom.com/wp-content/uploads/2011/05/iPhone%E6%B8%B8%E6%88%8F.jpg" style="text-decoration: none; color: #769e01; "><img wp-image-27352"="" src="http://gamerboom.com/wp-content/uploads/2011/05/iPhone%E6%B8%B8%E6%88%8F.jpg" alt="iPhone游戏" width="500" height="334" style="display: block; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; border-color: initial; border-image: initial; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #e1dfdf; border-right-color: #e1dfdf; border-bottom-color: #e1dfdf; border-left-color: #e1dfdf; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f3f3; background-position: initial initial; background-repeat: initial initial; " /></a><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; text-align: center; ">iPhone游戏</p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">本帖也是为我自己服务，我也希望获得某些信息指导我如何开发iPhone游戏，同时了解自己应该阅读哪些资料才能熟悉这个领域。深入挖掘互联网之后，我发现了一些有用的东西。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">我希望在这里同大家分享我的发现，大家也可以参与分享之列，提供自己的探索成果。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; "><strong>如果你们希望了解更多有关iPhone游戏开发的内容，以下资源列表不容错过：</strong></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone&#8212;&#8212;如果你对iPhone一无所知，那么就浏览这个网站。否则你就是井底之蛙。这是开发新手不容错过的内容。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">苹果的iPhone开发者中心&#8212;&#8212;这是获取iPhone开发资源的主要渠道。开发者可以从此下载游戏开发工具包iPhone SDK（游戏邦注：只针对MAC协议），观看指导教程、纪录片代码资源。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Appsamuck.com&#8212;&#8212;iPhone指导教程。</p><div id="attachment_27354"  aligncenter"="" style="margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; width: 410px; "><a href="http://gamerboom.com/wp-content/uploads/2011/05/appsamuck.jpg" style="text-decoration: none; color: #769e01; "><img wp-image-27354"="" src="http://gamerboom.com/wp-content/uploads/2011/05/appsamuck.jpg" alt="appsamuck" width="400" height="300" style="display: block; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; border-color: initial; border-image: initial; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #e1dfdf; border-right-color: #e1dfdf; border-bottom-color: #e1dfdf; border-left-color: #e1dfdf; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f3f3; background-position: initial initial; background-repeat: initial initial; " /></a><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; text-align: center; ">appsamuck</p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; "><strong>iPhone开发工具：</strong></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Unity&#8212;&#8212;提供iPhone游戏开发解决方案。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iTorque&#8212;&#8212;Garage Games推出的开发工具。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Cocos 2D&#8212;&#8212;2D游戏开发框架。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Oolong Engine&#8212;&#8212;服务于3D游戏开发。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">ShiVa&#8212;&#8212;Stone Trip推出的iPhone开发工具。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone Game Kit&#8212;&#8212;能够帮助开发者24小时内创建iPhone游戏。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; "><strong>iPhone博客：</strong></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Tap Tap Tap iPhone博客&#8212;&#8212;我还没有深入研究，但似乎是个不错的iPhone博客，值得大家标记书签。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Shadhex博客&#8212;&#8212;侧重iPhone编程，这是个新兴博客，其未来发展有待时间证明。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; "><strong>iPhone新闻、网站和有趣故事（游戏邦注：其中参杂些许不那么有趣的故事）：</strong></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone施压任天堂掌机霸主地位&#8212;&#8212;Oberon Media公司对于App Store潜力无限期待。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">99美分App Store的困境&#8212;&#8212;我们无法确定App Store是否真的陷如困境，但我们从中能够整体把握商店所售商品（游戏邦注：其中游戏23%，娱乐应用11%，实用工具10%）</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone开发商由穷致富&#8212;&#8212;独立开发者如何在iPhone开发领域发展壮大的故事着实趣味横生，同时激励人心。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">编码员新作耗资50万表明iPhone淘金热继续上演&#8212;&#8212;这是另一有关游戏《iShoot》的有趣故事。</p><div id="attachment_27353"  aligncenter"="" style="margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; width: 490px; "><a href="http://gamerboom.com/wp-content/uploads/2011/05/iShoot.jpg" style="text-decoration: none; color: #769e01; "><img wp-image-27353"="" src="http://gamerboom.com/wp-content/uploads/2011/05/iShoot.jpg" alt="iShoot" width="480" height="319" style="display: block; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: initial; border-color: initial; border-image: initial; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #e1dfdf; border-right-color: #e1dfdf; border-bottom-color: #e1dfdf; border-left-color: #e1dfdf; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f3f3; background-position: initial initial; background-repeat: initial initial; " /></a><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; text-align: center; ">iShoot</p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">对话iPhone盗版者&#8212;&#8212;这是有关iPhone盗版者的有趣/悲伤/滑稽/刺激/愚蠢故事（游戏邦注：这取决于玩家自身观点）。对于那些公开回应相关问题的盗版者我很是钦佩。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">曝光应用的网站列表。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Appshopper.com&#8212;&#8212;iPhone商店。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; "><strong>其他资源：</strong></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Ari提供的iPhone资源列表（这是很好的资源）。（<span style="color: #ff0000; ">本文为游戏邦/gamerboom.com编译，如需转载请联系：游戏邦</span>）</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">The Top iPhone Game Development Resources For Beginners</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">This post is for myself. I wanted to get some information about how to do iPhone games and what resources I should read to get familiar with this stuff. After digging a long hole in the Internet I found some gold &#8211; so to speak.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Of course after finding this stuff for myself, I also made it available to you guys. In fact, you can also participate and share your own iPhone findings.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Here&#8217;s the list of resources you gotta check out if you want to know more about iPhone game development:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone &#8211; if you don&#8217;t know what iPhone is, check this. Or your eye sight. It&#8217;s like something you must have heard about. (I&#8217;m trying to be funny here)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Apple&#8217;s iPhone developer center &#8211; the main resource to gain information about iPhone development. Here you can download the iPhone SDK for development (Mac only) and see tutorials, documentary, code reference and so on. (See also iPhone Developer Program)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Appsamuck.com &#8211; iPhone tutorials (thanks Chris)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone development tools:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Unity offers an iPhone development solution.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iTorque is a development tool by Garage Games.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Cocos 2D &#8211; framework for building 2D game (thanks Totty)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Oolong Engine &#8211; for 3D games (thanks shadhex)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">ShiVa &#8211; iPhone development tool by Stone Trip (thanks Daniel)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone Game Kit &#8211; &#8220;make your iPhone game in 24 hours&#8221; (thanks Nicol&#225;s)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone blogs:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Tap Tap Tap iPhone blog &#8211; Haven&#8217;t checked it much, but seemed like a decent iPhone blog (with some sales numbers too) that might be worth bookmarking.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Shadhex blog, &#8220;mainly about iPhone programming&#8221;. It&#8217;s a new site but we&#8217;ll see if it grows larger</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone news, sites and nice (plus some not so nice) stories:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">&#8220;iPhone will put pressure on Nintendo&#8217;s handheld dominance&#8221;&#8216; &#8211; Oberon Media is excited about the App Store opportunities.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Trouble in the 99 cent App Store &#8211; Not sure if it&#8217;s trouble, but you can get a pretty good picture about what they sell in app store (mainly Games 23%, Entertainment, 11%, Utilities 10%&#8230;)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">iPhone Developers Go From Rags to Riches &#8211; Really cool &amp; motivating story about an indie who made it big in iPhone development.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Coder&#8217;s Half-Million-Dollar Baby Proves iPhone Gold Rush Is Still On &#8211; Another great story about the game iShoot</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">A conversation with an iPhone pirate. A funny/sad/hilarious/provocative/stupid (depends about your point-of-view) about iPhone pirates. I gotta give credit for the pirate to answer openly to those questions.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">List of sites to get your app noticed (thanks Nikita)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Appshopper.com &#8211; iPhone store (thanks for the tip shadhex).</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">And here&#8217;s much more:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">Ari&#8217;s big list of iPhone resource (very good one, thanks for sharing)</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; text-indent: 2em; color: #666666; font-family: Arial, Helvetica, sans-serif; line-height: 24px; text-align: left; background-color: #ffffff; ">That&#8217;s it folks.（Source：<a href="http://www.gameproducer.net/2009/02/26/the-top-iphone-game-development-resources-for-beginners/" style="text-decoration: none; color: #769e01; ">gameproducer</a>）</p><img src ="http://www.cppblog.com/inkcpp/aggbug/174535.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-05-11 09:15 <a href="http://www.cppblog.com/inkcpp/archive/2012/05/11/174535.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于iPhone和iPad的图标的思考</title><link>http://www.cppblog.com/inkcpp/archive/2012/05/11/174534.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Fri, 11 May 2012 01:14:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/05/11/174534.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/174534.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/05/11/174534.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/174534.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/174534.html</trackback:ping><description><![CDATA[<span style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; font-size: 15px; line-height: 20px; ">来自：&nbsp;</span><a href="http://luoyl.info/blog/2012/03/iphone-ipad-icons/" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; font-size: 15px; line-height: 20px; ">http://luoyl.info/blog/2012/03/iphone-ipad-icons/</a>&nbsp;<br /><br /><div style="margin-top: 19px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; height: 58px; width: 609px; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #ebf1ed; border-right-color: #ebf1ed; border-bottom-color: #ebf1ed; border-left-color: #ebf1ed; border-image: initial; "><p style="margin-top: 4px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 50px; width: 601px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f4f4; "><span style="display: block; height: 31px; width: 578px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 8px; line-height: 1.4; overflow-x: hidden; overflow-y: hidden; ">图标是IOS程序包所必需的组成部分。如果你没有提供程序所需的各种尺寸的图标,程序上传发布时可能会无法通过验证。</span></p></div><div id="article_text_font" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; height: auto; width: 643px; word-wrap: break-word; "><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 15px; line-height: 20px; word-wrap: break-word; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; text-align: center; "><img src="http://www.cppblog.com/images/cppblog_com/inkcpp/1.png" width="689" height="515" alt="" /><br /></p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 15px; line-height: 20px; word-wrap: break-word; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><span style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; "><br />图标是IOS程序包所必需的组成部分。如果你没有提供程序所需的各种尺寸的图标,程序</span><span id="rlt_6" style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #fa891b; ">上传</span><span id="rlt_5" style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #fa891b; ">发布</span><span style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">时可能会无法通过验证。IOS程序为兼顾不同的</span><span id="rlt_2" style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #fa891b; ">应用</span><span style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">场景，定义了多个不同规格的图标，并以不同的命名区分：</span><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="outline-style: none; outline-width: initial; outline-color: initial; "><br />IOS图标尺寸一览</strong><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="outline-style: none; outline-width: initial; outline-color: initial; ">iPhone专用程序:</strong><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " />&nbsp;</p><table cellspacing="0" cellpadding="0" style="font-size: 14px; outline-style: none; outline-width: initial; outline-color: initial; border-collapse: collapse; border-top-style: solid; border-top-color: #e0e0e0; border-left-style: solid; border-left-color: #e0e0e0; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; width: 600px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; "><tbody style="outline-style: none; outline-width: initial; outline-color: initial; "><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td colspan="1" rowspan="1" width="120" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">图标名称</td><td colspan="1" rowspan="1" width="100" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">大小</td><td colspan="1" rowspan="1" width="80" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">圆角</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用途</td><td colspan="1" rowspan="1" width="50" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">57 X 57</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">10px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于程序商店和在iPhone/iPod Touch中<span id="rlt_4" style="outline-style: none; outline-width: initial; outline-color: initial; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #fa891b; ">显示</span></td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon@2x.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">114 X 114</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">20px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon.png的高清模式</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-Small.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">29 X 29</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">20px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于设置和Spotlight搜索</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-Small@2x.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">58 X 58</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">8px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-Small.png的高清模式</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr></tbody></table><span style="line-height: 1.8;">&nbsp;</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="line-height: 1.8; outline-style: none; outline-width: initial; outline-color: initial; ">ipad专用程序:</strong><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><table cellspacing="0" cellpadding="0" style="font-size: 14px; outline-style: none; outline-width: initial; outline-color: initial; border-collapse: collapse; border-top-style: solid; border-top-color: #e0e0e0; border-left-style: solid; border-left-color: #e0e0e0; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; width: 600px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; "><tbody style="outline-style: none; outline-width: initial; outline-color: initial; "><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td colspan="1" rowspan="1" width="120" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">图标名称</td><td colspan="1" rowspan="1" width="100" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">大小</td><td colspan="1" rowspan="1" width="80" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">圆角</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用途</td><td colspan="1" rowspan="1" width="50" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-72.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">72 X 72</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">20px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于在iPad桌面中显示</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-50.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">50&nbsp;X 50</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">?</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于iPad中的Spotlight搜索</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-29.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">29&nbsp;X 29</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">10px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">设置页面</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr></tbody></table><span style="line-height: 1.8;">&nbsp;</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="line-height: 1.8; outline-style: none; outline-width: initial; outline-color: initial; ">通用程序:</strong><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><table cellspacing="0" cellpadding="0" style="font-size: 14px; outline-style: none; outline-width: initial; outline-color: initial; border-collapse: collapse; border-top-style: solid; border-top-color: #e0e0e0; border-left-style: solid; border-left-color: #e0e0e0; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; width: 600px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; "><tbody style="outline-style: none; outline-width: initial; outline-color: initial; "><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td colspan="1" rowspan="1" width="120" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">图标名称</td><td colspan="1" rowspan="1" width="100" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">大小</td><td colspan="1" rowspan="1" width="80" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">圆角</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用途</td><td colspan="1" rowspan="1" width="50" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-72.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">72 X 72</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">20px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于在iPad桌面中显示</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">57 X 57</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">10px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于程序商店和在iPhone/iPod Touch中显示</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">必需</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-50.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">50&nbsp;X 50</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">10px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于iPad中的Spotlight搜索</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr><tr style="outline-style: none; outline-width: initial; outline-color: initial; "><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">Icon-29.png</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">29 X 29</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">20px</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">用于设置和Spotlight搜索</td><td style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; word-break: break-all; word-wrap: break-word; height: 20px; border-right-style: solid; border-right-color: #e0e0e0; border-bottom-style: solid; border-bottom-color: #e0e0e0; ">&nbsp;</td></tr></tbody></table><span style="line-height: 1.8;">&nbsp;</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="line-height: 1.8; outline-style: none; outline-width: initial; outline-color: initial; ">取消图标上的高光</strong><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><span style="font-size: 15px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">系统会默认会在图标上</span><span id="rlt_7" style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; cursor: pointer; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #fa891b; ">自动</span><span style="font-size: 15px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">加上半透明的高光半圆，如果我们不想要这个效果或者图标本身已经包含了这个高光效果，我们可以在项目配置里把系统的高光功能取消掉：</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="line-height: 1.8; outline-style: none; outline-width: initial; outline-color: initial; "><br />xcode3.2x建的项目：</strong><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><span style="font-size: 15px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">在info plist里加一个配置项，key为&#8220;Icon already includes gloss and bevel effects&#8221;， 类型为bool，然后打上钩就，这样系统就不会自动加高光；</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><span style="line-height: 1.8;">&nbsp;</span><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="line-height: 1.8; outline-style: none; outline-width: initial; outline-color: initial; ">xcode4建的项目：</strong><br style="font-size: 15px; outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; "><font color="#333333" face="'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif"><span style="font-size: 15px; line-height: 24px;"><img src="http://www.cppblog.com/images/cppblog_com/inkcpp/2.png" width="810" height="702" alt="" /><br style="outline-style: none; outline-width: initial; outline-color: initial; " /></span></font><span style="font-size: 15px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">这样程序中的高光效果就取消了。</span><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><font face="'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体"><span style="font-size: 15px; line-height: 20px;">&nbsp;</span></font><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><font face="'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体"><span style="font-size: 15px; line-height: 20px;">&nbsp;</span></font><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><strong style="font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; font-size: 15px; line-height: 20px; outline-style: none; outline-width: initial; outline-color: initial; ">itunes connect上的图标</strong><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; " /><span style="font-size: 15px; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; ">我们在itunes connect网站上创建应用时也要求上传图标，上传后&nbsp;itunes connect也会给图标加上高光效果。这不用担心，如果我们的程序已经取消了高光效果，在程序上传后，网站上图标的高光效果也会自动取消掉的。</span></p><div style="line-height: 1.8; "><span style="color: #333333; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, Verdana, sans-serif; line-height: 24px; "><br /></span></div></div><img src ="http://www.cppblog.com/inkcpp/aggbug/174534.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-05-11 09:14 <a href="http://www.cppblog.com/inkcpp/archive/2012/05/11/174534.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> iOS5 ARC学习笔记</title><link>http://www.cppblog.com/inkcpp/archive/2012/05/10/174436.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Thu, 10 May 2012 01:14:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/05/10/174436.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/174436.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/05/10/174436.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/174436.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/174436.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">iOS5中加入了新知识，就是ARC,其实我并不是很喜欢它，因为习惯了自己管理内存。但是学习还是很有必要的。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">在iOS开发过程中，属性的定义往往与retain, assign, copy有关，我想大家都很熟悉了，在此我也不介绍，网上有很多相关文章。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">现在我们看看iOS5中新的关键字strong, weak, unsafe_unretained. 可以与以前的关键字对应学习strong与retain类似，weak与unsafe_unretained功能差不多（有点区别，等下会介绍，这两个新关键字与assign类似）。在iOS5中用这些新的关键字，就可以不用手动管理内存了，从java等其它语言转过来的程序员非常受用。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">strong关键字与retain关似，用了它，引用计数自动＋1，用实例更能说明一切</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;strong)&nbsp;NSString&nbsp;*string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;strong)&nbsp;NSString&nbsp;*string2;&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">有这样两个属性，</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">@synthesize&nbsp;string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">@synthesize&nbsp;string2;&nbsp;&nbsp;</li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">猜一下下面代码将输出什么结果？</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;@<span style="color: #009900; ">"String&nbsp;1"</span>;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string2&nbsp;=&nbsp;self.string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;nil;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">NSLog(@<span style="color: #009900; ">"String&nbsp;2&nbsp;=&nbsp;%@"</span>,&nbsp;self.string2);&nbsp;&nbsp;</li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">结果是：String 2 = String 1</span><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">由于string2是strong定义的属性，所以引用计数＋1，使得它们所指向的值都是@"String 1", 如果你对retain熟悉的话，这理解并不难。</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">接着我们来看weak关键字：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">如果这样声明两个属性：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;strong)&nbsp;NSString&nbsp;*string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;weak)&nbsp;NSString&nbsp;*string2;&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">并定义</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">&lt;pre&nbsp;name=<span style="color: #009900; ">"code"</span>&nbsp;<span style="color: #0000ff; ">class</span>=<span style="color: #009900; ">"cpp"</span>&gt;@synthesize&nbsp;string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">@synthesize&nbsp;string2;&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><pre style="white-space: pre-wrap; word-wrap: break-word; line-height: 26px; text-align: left; background-color: #ffffff; "></pre><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">再来猜一下，下面输出是什么？</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;@<span style="color: #009900; ">"String&nbsp;1"</span>;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string2&nbsp;=&nbsp;self.string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;nil;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">NSLog(@<span style="color: #009900; ">"String&nbsp;2&nbsp;=&nbsp;%@"</span>,&nbsp;self.string2);&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">结果是：String 2 = null</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">分析一下，由于self.string1与self.string2指向同一地址，且string2没有retain内存地址，而self.string1=nil释放了内存，所以string1为nil。声明为weak的指针，指针指向的地址一旦被释放，这些指针都将被赋值为nil。这样的好处能有效的防止野指针。在c/c++开发过程中，为何大牛都说指针的空间释放了后，都要将指针赋为NULL. 在这儿用weak关键字帮我们做了这一步。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">接着我们来看unsafe_unretained</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">从名字可以看出，unretained且unsafe，由于是unretained所以与weak有点类似，但是它是unsafe的，什么是unsafe的呢，下面看实例。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">如果这样声明两个属性：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">并定义<br /><span style="font-family: monospace; "></span></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;strong)&nbsp;NSString&nbsp;*string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">@property&nbsp;(nonatomic,&nbsp;unsafe_unretained)&nbsp;NSString&nbsp;*string2;&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">再来猜一下，下面的代码会有什么结果？</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;@<span style="color: #009900; ">"String&nbsp;1"</span>;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string2&nbsp;=&nbsp;self.string1;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">self.string1&nbsp;=&nbsp;nil;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">NSLog(@<span style="color: #009900; ">"String&nbsp;2&nbsp;=&nbsp;%@"</span>,&nbsp;self.string2);&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">请注意，在此我并没有叫你猜会有什么输出，因为根本不会有输出，你的程序会crash掉。</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">原因是什么，其实就是野指针造成的，所以野指针是可怕的。为何会造成野指针呢？同于用unsafe_unretained声明的指针，由于self.string1=nil已将内存释放掉了，但是string2并不知道已被释放了，所以是野指针。然后访问野指针的内存就造成crash. &nbsp;所以尽量少用unsafe_unretained关键字。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">strong,weak,&nbsp;unsafe_unretained往往都是用来声明属性的，如果想声明临时变量就得用__strong, &nbsp;__weak, __unsafe_unretained, &nbsp;__autoreleasing, 其用法与上面介绍的类似。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">还是看看实例吧。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">__strong&nbsp;NSString&nbsp;*yourString&nbsp;=&nbsp;@<span style="color: #009900; ">"Your&nbsp;String"</span>;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">__weak&nbsp;&nbsp;NSString&nbsp;*myString&nbsp;=&nbsp;yourString;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">yourString&nbsp;=&nbsp;nil;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">__unsafe_unretained&nbsp;NSString&nbsp;*theirString&nbsp;=&nbsp;myString;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; "><span style="color: #999999; ">//现在所有的指针都为nil</span>&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">再看一个：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">__strong&nbsp;NSString&nbsp;*yourString&nbsp;=&nbsp;@<span style="color: #009900; ">"Your&nbsp;String"</span>;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">__weak&nbsp;&nbsp;NSString&nbsp;*myString&nbsp;=&nbsp;yourString;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">__unsafe_unretained&nbsp;NSString&nbsp;*theirString&nbsp;=&nbsp;myString;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">yourString&nbsp;=&nbsp;nil;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; "><span style="color: #999999; ">//现在yourString与myString的指针都为nil,而theirString不为nil,但是是野指针。</span>&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">__autoreleasing的用法介绍：</span><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">在c/c++，objective-c内存管理中有一条是：谁分配谁释放。&nbsp;__autoreleasing则可以使对像延迟释放。比如你想传一个未初始化地对像引用到一个方法当中，在此方法中实始化此对像，那么这种情况将是__autoreleasing表演的时候。看个示例：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; line-height: 26px; text-align: left; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">-&nbsp;(<span style="color: #0000ff; ">void</span>)&nbsp;generateErrorInVariable:(__autoreleasing&nbsp;NSError&nbsp;**)paramError{&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSArray&nbsp;*objects&nbsp;=&nbsp;[[NSArray&nbsp;alloc]&nbsp;initWithObjects:@<span style="color: #009900; ">"A&nbsp;simple&nbsp;error"</span>,&nbsp;nil];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSArray&nbsp;*keys&nbsp;=&nbsp;[[NSArray&nbsp;alloc]&nbsp;initWithObjects:NSLocalizedDescriptionKey,&nbsp;nil];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSDictionary&nbsp;*errorDictionary&nbsp;=&nbsp;[[NSDictionary&nbsp;alloc]&nbsp;initWithObjects:objects&nbsp;forKeys:keys];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;*paramError&nbsp;=&nbsp;[[NSError&nbsp;alloc]&nbsp;initWithDomain:@<span style="color: #009900; ">"MyApp"</span>&nbsp;code:1&nbsp;userInfo:errorDictionary];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">}&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">-(<span style="color: #0000ff; ">void</span>)test&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">{&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSError&nbsp;*error&nbsp;=&nbsp;nil;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;[self&nbsp;generateErrorInVariable:&amp;error];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSLog(@<span style="color: #009900; ">"Error&nbsp;=&nbsp;%@"</span>,&nbsp;error);&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">}&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; " /><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">这样即便在函数内部申请的空间，在函数外部也可以使用，同样也适合谁分配谁释放的原则。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">同样下面的代码也是类似原因, 只不过在没有开启ARC的情况下适用：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">-(NSString&nbsp;*)stringTest&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">{&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;NSString&nbsp;*retStr&nbsp;=&nbsp;[NSString&nbsp;stringWithString:@<span style="color: #009900; ">"test"</span>];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff; ">return</span>&nbsp;[[retStr&nbsp;retain]&nbsp;autorelease];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">}&nbsp;&nbsp;</li></ol></div><br />开启ARC后，应改为：<p>&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_cpp"="" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; border-image: initial; background-color: #f5f5f5; width: 1609px; "><ol start="1" style="margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-bottom: 5px; position: relative; "><li style="border-left-style: none; line-height: 13px; ">-(NSString&nbsp;*)stringTest&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">{&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;__autoreleasing&nbsp;NSString&nbsp;*retStr&nbsp;=&nbsp;[NSString&nbsp;alloc]&nbsp;initWithString:@<span style="color: #009900; ">"test"</span>];&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff; ">return</span>&nbsp;retStr;&nbsp;&nbsp;</li><li style="border-left-style: none; line-height: 13px; ">}&nbsp;&nbsp;</li></ol></div><br />就介绍这么多了，有不对之处望指正。<br /><br />来源：http://blog.csdn.net/favormm/article/details/7023322<p>&nbsp;</p><img src ="http://www.cppblog.com/inkcpp/aggbug/174436.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-05-10 09:14 <a href="http://www.cppblog.com/inkcpp/archive/2012/05/10/174436.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPhone OS 开发 - 了解并解决代码签名问题</title><link>http://www.cppblog.com/inkcpp/archive/2012/05/10/174435.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Thu, 10 May 2012 01:13:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/05/10/174435.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/174435.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/05/10/174435.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/174435.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/174435.html</trackback:ping><description><![CDATA[<p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 32px; ">了解并解决代码签名问题</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">(为保持跟开发环境以及APPLE开发者社区网站结构对应，一些名词未作翻译)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　绝大多数iPhone Developer/Distribution 的代码签名生成错误是因为证书和Provisioning profiles没有在开发系统上正确安装引起的。本文描述在开发 iPhone OS 应用程序时所需要的文件以及如何安装它们。这个技术说明为&#8220;Program User Guide&#8221;提供支持，Program User Guide 可以在 Portal Resources 下的&nbsp;<a href="http://developer.apple.com/iphone/my/overview/index.action" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #004276; text-decoration: none; ">iPhone Developer Program Provisioning Portal</a>&nbsp;找到。如果你对 iPhone 开发刚入门，请先阅读 Program User Guide.</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">需要什么</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　所有 iPhone 应用程序在iPhone OS设备上运行之前必须用合法的 signing identity 进行签名。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 16px; ">为了在自己的iPhone OS设备开发而做应用程序签名，需要：</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">私钥</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">iPhone 开发者证书</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">Development Provisioning profile</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 16px; ">上 App Store 需要：</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">私钥</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">iPhone Distribution 证书</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">App Store Distribution Provisioning profile</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 16px; ">要用在 Ad Hoc 上需要：</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">私钥</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">iPhone Distribution 证书</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 40px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">Ad Hoc Distribution Provisioning profile</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　私钥是在生成认证签名请求（CSR）时创建的，在CSR提交和通过之后，可以在&nbsp;<a href="http://developer.apple.com/iphone/my/overview/index.action" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #004276; text-decoration: none; ">iPhone Developer Program Provisioning Portal</a>&nbsp;里创建和下载证书以及provisioning profiles。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">　　注意：</span>为了更好的区分不同的provisioning profile，在创建的时候注意命名，例如 "wild card dev profile", "MyApp Push distribution profile", &#8220;Ad Hoc Testers profile&#8221; 等等。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">这些东西的作用</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　Signing identity 由私有加密key和数字证书组成。在iPhone OS开发中，Xcode 用私钥来签署程序，这样程序就可以在iPhone OS开发设备上运行或者提交到app store。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　公钥包含 iPhone开发者/发布商证书，用来认证已签名的程序。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　Provisioning pfofiles 用来告知Xcode用哪个证书/私钥组合来签署程序。开发设备也通过它来决定如何认证安装在设备上的程序。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">证书 - 安装/校验</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　下载 iPhone Development 证书或者 iPhone Distribution 证书之后，双击下载的 .cer 文件启动 Keychain Access并安装证书。如果询问将证书安装到哪，请选择 "login" keychain。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　要确定证书是否正确安装，选择 "login" keychain 并且选择 "My Certificates" 类别。如果想要部署到你的开发设备，选择以"iPhone Developer Certificate"为标题开头的证书。如果要发布程序，选择以"iPhone Distribution Certificate"标题开头的证书。在 Information view 里应该有一个带选中标志的绿圈告诉你证书合法，意思就是 WWDR Intermediate Certificate 已经安装在系统里，并且证书已校验。要是看不见绿圈就应该从 iPhone Developer Program Provisioning Portal 下载 WWDR Intermediate Certificate 并且像安装iPhone Developer 或者 Distribution Certificate那样给它装上。选中的证书旁有个小三角，点击它会显示证书关联的私钥。要是没有，看看你是不是在&#8220;My Certificates&#8221;类别下。要对程序进行签名必须需要私钥，要是当前确实在"My Certificates"下并且还是没有小三角，需要作废旧证书并且创建并提交一个新的CSR来创建新的私钥和证书。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">注意：</span>如果创建了新私钥或者证书，关联到旧证书的配置文件就失效了，需要重新生成新 pfofiles。最好在拷贝新证书之前把旧的从开发机器和设备上删除掉，这样可避免新旧证书/配置文件混淆。这么做不影响已经在app store里的程序。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">警告：</span>安装 iPhone 证书后不要改动默认的 "Use System Defaults" 信任设置。如果信任设置不是'Use System Defaults'，在生成应用程序的时候会得到一个 CSSMERR_TP_NOT_TRUSTED 签名错误。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">Provisioning Profiles - 安装/校验</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　要把从iPhone Developer Program Provisioning Portal下载回来的Provisioning Profile安装到开发机器，首先需要启动 Xcode然后点击"Window &gt; Organizer"来打开Organizer。把provisioning profile拖到标记为"Provisioning Profiles"的区域内即可。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　如果是为了开发而安装 Provisioning Profile，还需要把它装在开发设备上。在 iPhone OS 设备已经插到电脑上的时候，在 Devices 三角下选择设备，然后在Organizer里把开发provisioning profile拖进去。这就把 Provisioning profile装到 iPhone OS设备里了。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">注意：</span>确保安装在开发设备和Mac里的 Development Provisioning完全相同对成功生成并安装测试程序是非常重要的。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">注意：</span>跟 Development Provisioning Profiles不同，App Store Distribution Provisioning Profiles不能安装在iPhone OS设备里。用App Store Distribution Provisioning生成的程序是用来通过 iTunes Connect上传到App Store的。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　要告诉 Xcode 使用哪个 Provisioning profile，打开 Xcode 项目，打开 Target build settings，滚动到 Code Signing。在 Code Signing 区域有个带小三角的 Code Signing Identity。确定设置是为任何 iPhone OS 设备，之后在Value列点击弹出菜单并且选择要使用的 Provisioning Profile。为了开发，建议选择 "iPhone Developer"，要发布，建议选择"iPhone Distribution"。这些都在弹出菜单的"Auto matic Profile Selector"区域里，这样就可以使 Xcode来为你找到正确的Provisioning Profile。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　注意：要是丢失了 iPhone devloper/Distribution证书的私钥，就无法选择证书关联到的 Provisioning Profile。从备份中导入 iPhone developer/Distribution 证书的私钥可以解决这个问题。如果丢了或者删了私钥，就得生成一个新的CSR并且下载新的 iPhone Developer/Distribution 证书和Provisioning Profile。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　程序的 Bundle Identifier 必须跟Provisioning profiles的Bundle Identifier APP ID匹配。要编辑程序的 Bundle Identifier，打开 target's properties settings，在 Identifier 栏输入 Bundle Identifier。如果在 App id的bundle identifier里使用星号通配符，就可以替换为反向DNS格式的字符。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　下面有一些可以输入到 Identifier 框的例子。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　如果AppID是 A1B2C3D4E5.com.domainname.applicationname。输入com.domainname.applicationname 作为 Bundle Identifier</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　AppID是 A1B2C3D4E5.*，输入反向DNS格式的字符串作为 Bundle Identifier。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">关于 Profiles 和 App IDs</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　创建 Provisioning Profiles 时可以关联两种类型的 App ID。第一个类型叫做通用App ID（Wildcard App ID）。推荐大多数iPhone OS开发用通用App ID的Provisioning Profiles，因为这样单个通用App ID可以用来生成和安装大多数程序，包括 iPhone Reference Libary 里的示例代码。通用App ID通过在&nbsp; Identifier 里输入星号创建。星号必须是App ID字符串的最后一个字符。如果使用通用App ID，记着在Xcode项目里输入Bundle Identifier时把星号替换为反向DNS格式。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">假设有 App ID ABCDE12345.*：</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">ABCDE12345是Bundle种子ID(由Apple生成)</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">*是App ID的Bundle Identifier。在xcode里输入bundle identifier时需要把星号替换为反向DNS格式。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">假设有 App ID: ABCDE12345.com.yourcompany.*</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">ABCDE12345是Bundle种子ID(由Apple生成)</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">com.yourcompany.* 是App ID的Bundle Identifier。并且xcode项目里的bundle identifier必须以'com.yourcompany.'开头，星号可以替换成任意字串。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　第二类 App ID 称作固定AppID(Explicit App ID)。这类 APP ID限定了一个provisioning profile只允许一个程序安装。启用iPhone OS 3.0特性需要固定 App ID，例如 In App Purchase或者 App Push Notification 服务。固定ID通过输入指定字串创建。推荐做法是用反向DNS格式。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">　　<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; ">重要：</span>一个避免将来可能产生问题的提示：修改 yourcompany 为真正的名字。</p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">Ad Hoc</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">为 Ad Hoc发布生成应用程序跟生成App Store程序类似，只是多了两步。第一，需要用 iPhone Developer Program Provisioning Portal 创建一个 Ad Hoc Distribution provisioning Profile并添加发布目标设备的 UDID。第二，创建一个代码签名Entitlements file。关于如何创建Entitlements file请阅读 iPhone 开发者指南的&nbsp;<a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/115-Configuring_Applications/configuring_applications.html#//apple_ref/doc/uid/TP40007959-CH19-SW2" target="_top" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #004276; text-decoration: none; ">Managing Application Entitlements</a>部分。创建完 Entitlements file并把它添加到 Code Signing Entitlements build settings之后，打开EntitleMents File并且田间或编辑 get-task-allo把它设为false。<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; font-weight: bold; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 24px; ">文档修订记录</span></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">（原文的修订记录）<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /></p><p style="margin-top: 9px; margin-right: 0px; margin-bottom: 9px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-wrap: break-word; word-break: break-all; line-height: 1.8; position: relative; color: #353535; font-family: Tahoma, Helvetica, Arial, sans-serif; background-color: #ffffff; ">2010-04-13：新建。介绍iPhone开发中安装证书和provisioning profiles的步骤。<br /><br />来源：http://article.yeeyan.org/view/15661/101257</p><img src ="http://www.cppblog.com/inkcpp/aggbug/174435.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-05-10 09:13 <a href="http://www.cppblog.com/inkcpp/archive/2012/05/10/174435.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>The UDID Apocalypse or: How I Learned To Stop Using NSUserDefaults And Love The Keychain</title><link>http://www.cppblog.com/inkcpp/archive/2012/05/04/173657.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Fri, 04 May 2012 06:01:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/05/04/173657.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/173657.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/05/04/173657.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/173657.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/173657.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">By now you have probably heard that Apple is deprecating support for attaining a UDID from an iOS device and furthermore that they will be rejecting any app submissions that use the UDID in any way. The now deprecated way of retrieving the UDID was:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">NSString *udid = [[UIDevice currentDevice] identifier];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">As we can no longer use this, but will often still have need of a unique identifier Apple has suggested using a CFUUID. To get a unique string identifier you now need to do this:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);<br />NSString *uuid = (NSString *)CFUUIDCreateString (kCFAllocatorDefault,uuidRef);</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">This gives you a unique identifier however if you called these methods again you would get a different unique identifier which may be fine if you only ever need to use this identifier once but for many situations this is probably not what you want. Apple suggests using NSUserDefaults to store the UUID after you have made it. You would do that like so:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];<br />[userDefaults setObject:uuid forKey:@"UUID"];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Then if you need to retrieve the UUID at any point you would call:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];<br />NSString *uuid = [userDefaults objectForKey:@"UUID"];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">This is an ok solution. I say it is only ok because the problem with NSUserDefaults is that they do not persist if the user removes and reinstalls their application. This could wreak havoc on your app if for example the UUID is used to identify the device to a web service that served data to your app. Your users would find it frustrating to lose their data simply because they had reinstalled your app.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">A better solution is to store the UUID in the users keychain.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">If you are unfamiliar with the concept it is fairly simple. Each app has its own keychain that can be used to securely store passwords, certificates, keys etc. The keychain can even be shared among several different apps if needed though I will not cover that today.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">To make working with the keychain simpler Apple wrote an Objective-C wrapper class called KeychainItemWrapper which you can find&nbsp;<a href="http://developer.apple.com/library/ios/#samplecode/GenericKeychain/Listings/Classes_KeychainItemWrapper_h.html%23//apple_ref/doc/uid/DTS40007797-Classes_KeychainItemWrapper_h-DontLinkElementID_9" style="color: #336699; text-decoration: none; ">here</a>.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">To store our UUID in the keychain we first create a KeychainItemWrapper object with:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"UUID" accessGroup:nil];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">You can use whatever you want for the identifier. As I am only making this item available to this app I set the accessGroup to nil.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Now to save your UUID to the keychain use:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">[keychainItem setObject:uuid forKey:(id)kUUID];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">In this case I would have defined the constant kUUID with a # define such as:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">#define kUUID @"UUID"</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">To retrieve your UUID you need to make a keychainItemWrapper object and then call objectForKey like this:</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"UUID" accessGroup:nil];<br />[keychainItem objectForKey:(id)kUUID];</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">This UUID that is stored in the keychain will now persist if the user removes the app and reinstalls and even if they save an encrypted backup and do a restore. It will not persist if they do a full reset of the device or restore from an unencrypted backup.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">One word of warning, the keychain does not work in the iOS simulator.</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">Share and Enjoy:</p><img src ="http://www.cppblog.com/inkcpp/aggbug/173657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-05-04 14:01 <a href="http://www.cppblog.com/inkcpp/archive/2012/05/04/173657.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPad iPhone程序增加和删除启动画面</title><link>http://www.cppblog.com/inkcpp/archive/2012/04/24/172609.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Tue, 24 Apr 2012 07:27:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/04/24/172609.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/172609.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/04/24/172609.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/172609.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/172609.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 直接拖放到程序目录下面就可以了。&nbsp;Default.png &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iPhone默认启动图片， &nbsp; &nbsp; 320x480或者320x460Default@2x.png &nbsp; &nbsp; iPhone4启动图片 &nbsp; &nbsp; &nbsp;640x960或者640x920&nbs...&nbsp;&nbsp;<a href='http://www.cppblog.com/inkcpp/archive/2012/04/24/172609.html'>阅读全文</a><img src ="http://www.cppblog.com/inkcpp/aggbug/172609.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-04-24 15:27 <a href="http://www.cppblog.com/inkcpp/archive/2012/04/24/172609.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iOS OpenSource Library Collection</title><link>http://www.cppblog.com/inkcpp/archive/2012/04/19/172041.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Thu, 19 Apr 2012 14:43:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/04/19/172041.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/172041.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/04/19/172041.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/172041.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/172041.html</trackback:ping><description><![CDATA[<h2>UI</h2><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/jdg/MBProgressHUD" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">MBProgressHUD</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/myell0w/MTStatusBarOverlay" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">MTStatusBarOverlay</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/enormego/EGOTableViewPullRefresh" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">EGOTableViewPullRefresh</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/enormego/EGOTextView" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">EGOTextView</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/leah/PullToRefresh" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">PullToRefresh</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/boctor/idev-recipes/tree/master/VerticalSwipeArticles" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">VerticalSwipeArticles</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/boctor/idev-recipes/tree/master/SideSwipeTableView" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">SideSwipeTableView</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/boctor/idev-recipes/tree/master/CustomTabBar" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">CustomTabBar</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/thermogl/TISwipeableTableView" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">TISwipeableTableView</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/pppoe/LightMenuBar" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">LightMenuBar</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/jasonmorrissey/JMTabView" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">JMTabView</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/domesticcatsoftware/DCIntrospect" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">DCIntrospect</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="http://three20.info/" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Three20</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/devinross/tapkulibrary" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Tapku Library</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/akosma/CoreTextWrapper" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">CoreTextWrapper</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">NSAttributedString Additions for HTML</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/digdog/UIDickBar" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">UIDickBar</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/thefaj/OpenFlow" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">OpenFlow</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/devindoty/iBooks-Flip-Animation" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">iBooks Flip Animation</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/mattrajca/SVGKit" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">SVGKit</a></div><h2>Data</h2><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/stig/json-framework" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">JSON Framework</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/johnezang/JSONKit" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">JSONKit</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/enormego/egodatabase" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">EGO Database</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/ccgus/fmdb" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">FMDB</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/magicalpanda/MagicalRecord" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">MagicalRecord</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/dev5tec/FBEncryptor" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">FBEncryptor</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/zootreeves/Objective-C-HMTL-Parser" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Objective-C HMTL Parser</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/Objective3/ElementParser" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">ElementParser</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/topfunky/hpple" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Hpple</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/doskoi/hpple" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Hpple (I Add child nodes method)</a></div><h2>Internet</h2><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="http://allseeing-i.com/ASIHTTPRequest/" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">ASIHTTPRequest</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/jdg/oauthconsumer" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">OAuth Consumer</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/bengottlieb/Twitter-OAuth-iPhone" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Twitter OAuth</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/mattgemmell/MGTwitterEngine" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">MGTwitterEngine</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/amazonwebservices/aws-sdk-for-ios" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">AWS SDK for iOS</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="http://www.omnigroup.com/company/developer" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">OmniGroup</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/futuretap/FTLocationSimulator" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">FTLocationSimulator</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/route-me/route-me" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Rout Me</a></div><h2>Other</h2><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/kaler/CrashKit" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">CrashKit</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="http://www.getsharekit.com/" target="_blank" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">ShareKit</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/futuretap/InAppSettingsKit" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">InAppSettingsKit</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/runmad/GiftKit" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">GiftKit</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/mattgallagher/AudioStreamer" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Audio Streamer</a></div><div style="color: #666666; font-family: Georgia, serif; background-color: #ffffff; font-size: 16px; line-height: 22px; margin-bottom: 0.9em; "><a href="https://github.com/atebits/SimFinger" style="text-decoration: none; color: black; border-bottom-color: #ef0050; border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; ">Sim Finger</a></div><img src ="http://www.cppblog.com/inkcpp/aggbug/172041.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-04-19 22:43 <a href="http://www.cppblog.com/inkcpp/archive/2012/04/19/172041.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPhone 真机调试 ( Xcode 3.2.5 + iOS SDK 4.2.1 )</title><link>http://www.cppblog.com/inkcpp/archive/2012/04/19/171951.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Thu, 19 Apr 2012 02:21:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/04/19/171951.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/171951.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/04/19/171951.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/171951.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/171951.html</trackback:ping><description><![CDATA[<div>http://diwublog.com/archives/140</div><img src ="http://www.cppblog.com/inkcpp/aggbug/171951.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-04-19 10:21 <a href="http://www.cppblog.com/inkcpp/archive/2012/04/19/171951.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SQLite在多线程环境下的应用</title><link>http://www.cppblog.com/inkcpp/archive/2012/03/07/167308.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Wed, 07 Mar 2012 04:50:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/03/07/167308.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/167308.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/03/07/167308.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/167308.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/167308.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这几天研究了一下SQLite这个嵌入式数据库在多线程环境下的应用，感觉里面的学问还挺多，于是就在此分享一下。先说下初衷吧，实际上我经常看到有人抱怨SQLite不支持多线程。而在iOS开发时，为了不阻塞主线程，数据库访问必须移到子线程中。为了解决这个矛盾，很有必要对此一探究竟。关于这个问题，最权威的解答当然是SQLite官网上的&#8220;Is SQLite threadsafe?&#8221;这...&nbsp;&nbsp;<a href='http://www.cppblog.com/inkcpp/archive/2012/03/07/167308.html'>阅读全文</a><img src ="http://www.cppblog.com/inkcpp/aggbug/167308.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-03-07 12:50 <a href="http://www.cppblog.com/inkcpp/archive/2012/03/07/167308.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>手机产品设计禁忌</title><link>http://www.cppblog.com/inkcpp/archive/2012/03/05/167180.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Mon, 05 Mar 2012 07:38:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/03/05/167180.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/167180.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/03/05/167180.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/167180.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/167180.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">在做手机产品设计的过程中，遇到很多看似很小，且很容易被忽略的问题，正是这些小问题，一次次的撩拨用户的耐心，让用户对你的产品心生怨念。刚出道的朋友没有经过实战，对细节注意不多，往往都会遇到类似的问题，强调多次后，觉得不如写下来，给新人共勉。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">1、没有不可点击的效果</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">一般按钮会有四态，不可点击效果、可点击效果、聚焦状态、按下状态。如果你的按钮此时处于不可用状态，那么一定要灰掉，或者拿掉按钮，否则会给用户误导。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;2、菜单层次太深</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">菜单项以5~7个为宜，如果有二级菜单，就要注意合理的菜单分类，不能有太多层级的菜单，否则很难预期，也很难找到，寻找和返回都会变得很麻烦。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">3、文字长度不加以限制</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">手机界面很小，寸土寸金，一页只能显示下6~10个列表，一行只能显示下10~16个字，标题栏的字数以5个以内为宜，标签栏也以2~3个为宜，那么这时候出现文字过长的情况，一定要定义一下处理方式，如果是选择型的，一般是截断或者打点缩略；如果是内容阅读型的，可以折行。但最合理的方式还是精简文字内容，缩短文字长度。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">4、文字表意不明</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">由于手机是碎片时间、片段式阅读，所以手机界面上的文字表意性要求的更高，更苛刻，一定要在用户瞟到的瞬间，准确的传达信息。除了表意清晰之外，还要求语言精简，避免啰嗦；使用用户的语言而不是程序的语言；产品文案体现产品性格。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">5、交互流程分支太多</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">做交互的时候一定要有一个任务流程的概念贯穿始终，用户是为了完成某个任务而使用软件的，交互设计师除了关注界面元素、跳转逻辑和交互反馈之外，还要关注用户任务，分得清主要任务和次要人物，给主要任务一个畅通无阻的清晰流程，不要给予太多可能的分支，干扰主要流程。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">6、相关的选项离的很远</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">相关选项一定要具有操作上的延续性，虽然手机屏幕看起来比电脑屏幕要小的多，但是手机在屏幕上移动的代价，却要比鼠标在电脑上移动的代价大的多，如果手机上相关选选离得很远的话，用户一是容易迷失，找不到下一步操作，二是需要移动手指，到屏幕另一端触发操作。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">7、一次载入太多的数据</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">流量、电量、速度和稳定性是手机产品的四个硬指标，如果你的应用不能合理的帮助用户节约流量、电量，提升浏览速度和浏览体验，保证应用的稳定性能，就不要谈什么用户体验。你可以利用预加载缓存、批量载入、动态刷新、服务端数据压缩等方式来保证省、快、稳基础体验。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">8、按钮可点击范围比看起来小</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">我们都知道移动端有个神奇的数字&#8220;44&#8221;，根据食指最小点触距离7mm、拇指最小点触距离9mm，可以推导出做设计的时候，最小的点触距离是44*32 px。你可以设计一个精美的小图标，但是在定义它的点触大小的时候，却可以做放大处理，但你千万不要设计一个傻大的图标，点触范围却比图标要小，这样会给用户带来明显的误操作挫败感。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">9、标签页跟内容没有从属关系</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">标签页跟内容需要有很好的联动关系，一般一个界面内有二级标签就足够复杂了，千万不要再有三级标签、四级标签。每个标签页都有自己特有的内容，当切换标签的时候，内容跟着切换。标签页如果是点击切换，内容部分可以整体刷新，标签页如果是滑动切换，内容页也要跟着滑动切换，千万不要一个点、一个滑。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">10、把所有的操作都暴露出来</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">手机产品交互设计要经历缩减、隐藏、附加、组织的过程，千万不要妄图把什么功能、什么操作都暴露出来，以彰显强大。你需要把自己应用的所有功能所有操作做个优先级设定，那些常用的20%的功能，放在界面的主要位置上，其他80%的操作，放在次要位置或合理归类组织后，隐藏起来就可以了。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">11、没有空数据界面设计</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">我们在做设计的时候，往往是提供理想化的场景，用户都已经进来了，我们怎么玩。但是，往往应用刚推出的时候，是没有用户的，甚至当应用有了一定用户基础的时候，新进来的用户打开应用的时候，应用仍然可能是一种没有数据的状态，再或者当用户清楚了全部数据，这三种情况下，用户都可能遇到空数据的界面。新手设计师往往不加设计，这时候用户就会看到一个空白界面，茫然失措。有经验的做法就是，提供一个情感化的界面，告诉用户当前没有内容；更具引导性的做法，就是引导用户去执行操作。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">12、用户引导的滥用</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">去年就预言用户引导将要泛滥，很明显设计部门都喜欢用漂亮的引导界面告诉用户新增的功能或隐藏的应用，但不是所有的应用、所有的功能都需要花哨的引导的。如果是通用的功能、非重点的模块，根本就不需要引导；如果是功能告知，只需呀轻量级的引导；如果是版本更新说明，说明书式的引导可以采用，但是要言简意赅。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">13、无加载中状态</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">手机产品只要是需要联网，需要交换数据，都需要提供一个加载中状态的，无论是菊花转还是Toast还是对话框，你需要给开发人员一个全局的定义，并且要告知加载中是模态（前台加载）的还是非模态的（后台加载）。且要考虑到加载时间过长、网络开关没有打开、网络不通等情况分别怎么去处理。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">14、未定义Back的逻辑</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">在为Android做设计的时候，会涉及到硬件交互，其中Back键的使用，是一门学问，Android官方有一些指导原则可以借鉴，但是具体开发的时候，还是会有很多特殊情况，比如单一实例的替换、键盘及一些中间状态，这种情况下，Back可能需要被定义一下，该回到前一个实例（那就需要变成多实例了）还是该回到初始状态（清空输入内容或恢复初始状态）。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">15、无横屏模式的设计</strong></p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">由于横屏模式下，纵向空间变得格外宝贵，导航栏、标签栏、键盘都需要被压扁，横盘模式一定要考虑是简单拉伸适配还是重新设计，如果你的应用不适合在横屏模式下使用，就屏蔽横盘，如果你的应用包括应用widget都需要支持横盘模式（甚至是带侧滑键盘的横屏机器），就需要提供设计方案。如果是S60V5这种竖高的机器，甚至需要重新设计。</p><p style="margin-top: 0px; margin-bottom: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px; word-wrap: break-word; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-indent: 24px; color: #222222; font-family: Verdana, sans-serif, Arial, 宋体; background-color: #ffffff; ">作为手机产品交互设计师，利用设计规避问题，提升产品用户体验，把体验转化成价值，是我们所追求的境界。手机产品设计禁忌，是笔者遇到的一些设计问题，欢迎各路高手协同补充遇到的问题，共同避免重复发明轮子。</p><br /><br />来源：<a href="http://www.cocoachina.com/newbie/basic/2012/0305/4028.html">http://www.cocoachina.com/newbie/basic/2012/0305/4028.html</a><img src ="http://www.cppblog.com/inkcpp/aggbug/167180.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-03-05 15:38 <a href="http://www.cppblog.com/inkcpp/archive/2012/03/05/167180.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>总结iOS游戏的设计、营销和盈利方式</title><link>http://www.cppblog.com/inkcpp/archive/2012/03/02/166943.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Fri, 02 Mar 2012 01:13:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/03/02/166943.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/166943.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/03/02/166943.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/166943.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/166943.html</trackback:ping><description><![CDATA[<p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">如果你已经决定要制作iOS游戏，那么在你开始工作之前，你应当知道哪些内容呢？</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">我们在2011年发布了两款iOS游戏：《Garage Inc.》（1月份）和《KULA BLOX 》（9月份）。近期，我们花了大量时间思考这些经历，从中寻找可借鉴之处，这样下次就会做得更好。以下便是我们总结出的经验。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">首先，你需要的是认知度</strong>，这包括人们对你游戏或对工作室的认知度。需要让人们知道你的存在，知道你游戏的存在，从而关注你游戏的存在情况。这似乎是理所应当的事情。然而，虽然许多人都知道这一点，但真正将其贯彻到游戏设计、盈利和营销决策中的人确很少。我将在以下几段内容中对此进行具体的解释。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">让我们先从游戏设计开始</strong>。除非你是个知名开发者，或有大量可用在营销上的资金，或拥有可确保获得某种层次认识度的流行品牌，否则你最可能实现的是通过口舌宣传来让你的游戏变得流行。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">考虑下，你自己的iOS设备上的多数游戏是怎么来的。如果你自己没有iOS设备，或许你需要再重新考虑下是否应该进驻这个市场。如果你和我们一样， 那么多数购买决定是因为在好友的设备上试玩过游戏而做出的。好友会说：&#8220;我喜欢这款游戏，你试试看吧。&#8221;你说：&#8220;好的。&#8221;于是，尝试了这款游戏。经过一段 时间后，或许是10秒、15秒或更长的时间，你决定购买游戏。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">你的潜在用户也会有同样的做法。所以，这对设计提出的要求是：对于那些刚刚接触游戏的人，这些人可能未曾看过你的教程和屏幕截图也未曾阅读过你的营 销材料，确保这些人能够在接触游戏的前10秒或15秒内喜欢上游戏。如果他们不喜欢，那么他们就不会购买你的游戏。你的销售量就会受到影响。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">你要如何让游戏迅速俘获玩家呢？对于这个方面，我们也正处在探索中，所以这里无法提供通用的解决方案。当你在设计和测试游戏时，需要考虑到这个方面。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">顺便说下，你要知道，即便是主流iOS站点上的积极评论也不会给你带来过多的认识度和下载量。尽管受苹果推荐在多数情况下比获得专业评论要更有价 值，但也不能确保游戏获得成功。而且，你不应当将苹果推荐作为营销战略的最高目标。我们很幸运，两款游戏都受应用商店推荐为值得注意的新应用，但很可能你 完全没有听说过它们。这并不是说你不该让游戏获得评论或不应努力让游戏获得iTunes App Store推荐，这是你应当争取的目标。我想说的是，实现这些目标对营销来说还远远不够。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">假设你现在正在制作游戏，你已经将其设计成可以短时间内吸引用户。这确实是个良好的开始。那么，这样就足够了吗？当然不是。即便你确认自己已经实现上述目标，你也不应当止步于此。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">你的下个步骤是，考虑尽可能多的认识提升服务和盈利服务，看看哪些服务适合你并能够对你的游戏起到帮助。在这里，我不对任何服务做推荐，我会客观地总结目前存在的服务和它们的运转方式。<br /><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">免费游戏的盈利</strong><br />目前有许多服务和方法，可以让你将应用设置为下载免费。如果你想要知道如何通过免费游戏获得盈利，我将在下文中对此进行解释。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">最显而易见的方式是添加应用内置付费功能（下文简称&#8220;IAP&#8221;）。虽然用户无需为应用本身付费，但你可以向他们出售升级和附加产品。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">如果你不在游戏中设置IAP，那么免费提供游戏的优势便不那么明显。在这种情况下，设置应用免费的目标是构建认识度，这样当你开始为应用收费时才会 有更多人购买你的游戏。那些免费下载游戏的人可能在与好友的交谈中提及你的游戏，这些人成为了游戏的传播者。当你再次开始向用户收费时，此前玩家间的口舌 宣传便会带来额外的销售量。额外的销售数量取决于当游戏免费时下载游戏的人数以及他们向好友推荐的意愿度。在后者中，上述10到15秒的游戏玩法需求就有 着举足轻重的作用。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提升认知度</strong></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; font-size: 14px; line-height: 23px; text-align: center; "></div><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><br /><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Hey Zap：</strong>使用这个服务，你可以在不耗费大量资金的前提下让游戏获得很高的曝光度。它类似于 Foursquare，只是你签到的是游戏而不是地点。关注你的人可以看到你正在玩哪个游戏。签到达到特定次数时，你就能获得一枚徽章。目前有个SDK， 让你可以将Hey Zap按钮整合到游戏中，这样人们就可以在你的游戏中签到。Hey Zap的网站显示，目前该服务的用户签到总次数已超过1000万。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Game Center：</strong>苹果的游戏社交网络在iOS 5中有了显著的升级，增加了3个重要的功能：好友推荐、游戏推荐和从Game Center应用中购买游戏。在iOS 5发布前，Game Center的绝妙之处在于其排行榜和成就。但是，新的更新显著提升了好友所玩游戏的曝光度，相比以往来说成了更加强大的认知度构建服务。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">OpenFeint：</strong>这项服务与苹果的Game Center相似，只是范围更大而已。OpenFeint存在的时间更长，但是该服务不支持iPad，只支持iPhone和iPod touch。它包含成就、排行榜和好友。它也有个iOS应用，称为《Game Channel》。该应用的主要功能是&#8220;每日推荐免费游戏&#8221;。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">将OpenFeint整合到游戏中是免费的，你能够获得的好处同Game Center相似：你的好友可以在排行榜上看到你的分数以及你所获得的成就等。但是，与Game Center不同的是，OpenFeint允许你付费让用户看到你的游戏。&#8220;每日免费游戏&#8221;服务便由此产生。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">通过支付费用（游戏邦注：可以是固定费用也可以是盈利抽成），你的游戏可以被推荐到OpenFeint旗下《Game Channel》的&#8220;每日免费游戏&#8221;上。由此带来的认知度可能会转变成销售量。如果你的游戏并非免费的，不要担心，你仍然可以开展&#8220;每日免费游戏&#8221;促销， 只要你将游戏中的某些东西设置为免费即可，这样对你的新用户来说仍然是个不错的交易。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">OpenFeint还有3种其他的服务。Fire Sale是个团购打折项目，OpenFeint玩家社区可投票表决他们希望看到打折的应用和打折比例。第2个是GameFeed，这是个相对较新的游戏内 置社交行为新闻播报服务，你可能还未在游戏中见过。它就像证券报价机，在菜单屏幕底部滚动，向你展示好友正在玩的游戏和他们的表现。第3个是OFX，这是 OpenFeint开设的应用商店，让你在无需向苹果提交二进制码的前提下修改你的游戏内置商店的产品售价。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Free App A Day：</strong>这是个类似于OpenFeint的&#8220;每日免费游戏&#8221;的服务，但是不含有社交网络功能。严格地说，它是个付费服务，有应用、网站和大量可以看到受推荐游戏的用户。<br /><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">盈利</strong><br /><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">TapJoy</strong>兼具提升认知度和盈利性的特点。该公司的主要服务是Offerwall，这种方法让开发商可以付费 让用户下载他们的游戏。玩家可以使用玩游戏所获得的虚拟货币来下载新游戏。新游戏开发商为此等下载买单，TapJoy将部分盈利分给下载来源游戏的开发 商。2011年早期，苹果开始限制包含这种类型服务的应用。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">TapJoy还有其他的服务，包括传统的游戏内置条幅广告、视频推广和全页面插播广告。它们的运作方式都很相似，你付费让自己的内容呈现在其他的游 戏中（提升游戏认知度）或者当用户在你的游戏中点击广告或观看视频时你获得抽成（盈利）。从玩家的角度来看，他们与这些广告和视频互动也可以让他们获得一 定的游戏奖励。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">AdColony：</strong>这项服务用虚拟货币来奖励观看视频的玩家，类似于TapJoy中的视频推广。如果你在自己的游戏中展示视频，用户的完整观看能够为你带来一定收入。如果你希望自己的游戏视频被展示在其他游戏中，那么你就必须为用户的每次完整观看付费。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Flurry：</strong>尽管众人熟知的Flurry是家分析公司，但他们还拥有AppCircle，这是个针对iOS的交叉推广网络，使用他们的推荐引擎向玩家推荐游戏。类似于其他此类服务，你通过付费来让玩家在其他应用中看到你的游戏，你在自己的应用中展示其他开发商的游戏能够获得盈利。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">Flurry还有个称为AppCircle Clips的新服务，也是向完整观看视频（游戏邦注：通常是游戏预告片）的用户支付虚拟货币。与上述情况相同，做广告的开发商付费，播放视频广告的开发商获得盈利。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Kiip：</strong>这是个新公司，目前只在美国市场运营。Kiip将现实世界奖励同获得成就联系起来。与其他服务不同的是，这项服务完全以盈利为目标。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">以下是这项服务的运转方式：你在玩游戏时获得一项成就。所有人都会对获得成就感到欣喜，但现在你还能够收到1条消息，你从Kiip处获得奖励。奖励 可能是1袋薯片、1杯打折饮料或1根口红。作为开发商，你只需要整合他们的SDK，剩下的都交由该公司来完成。当用户点击收集他们的奖励时，你就能够获得 盈利。<br /><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">但需要记住以下这几点：</strong><br />1）你无需整合所有的服务，因为这对你来说等同于大量的工作，而且很可能会让你的玩家感到困惑。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">2）当你发布新游戏时，努力取得强劲的开局，因为应用商店中的排名是维持销售量的最重要因素，营销持续时间过长会影响到效果。要尽快获得强劲势头，然后努力保持。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">3）先提升认知度，然后再专注于盈利。你需要拥有足够数量的玩家，才能够通过他们来盈利。换句话说，如果你没有用户，那么所有的盈利方式都无法生效。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">4）但要把握展开盈利行动的时机，要使用不同策略保持用户对游戏的兴趣。如果无法招徕或者留住玩家，你就没有办法实现盈利。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">5）还有最后一个提醒：不要做无价值的游戏。应用商店中有许多优秀的游戏，无价值的游戏根本没有生存空间。</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; line-height: 23px; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; ">来源:雷锋网</p><img src ="http://www.cppblog.com/inkcpp/aggbug/166943.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-03-02 09:13 <a href="http://www.cppblog.com/inkcpp/archive/2012/03/02/166943.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How to use iPhone with File I/O Functions: A Tutorial for Software Developers</title><link>http://www.cppblog.com/inkcpp/archive/2012/02/29/166787.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Wed, 29 Feb 2012 07:20:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/02/29/166787.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/166787.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/02/29/166787.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/166787.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/166787.html</trackback:ping><description><![CDATA[<font face="Verdana, Arial, sans-serif" size="3"><span style="line-height: normal;">来源：</span></font><a href="http://www.servin.com/iphone/iPhone-File-IO.html" style="font-family: Verdana, Arial, sans-serif; font-size: medium; line-height: normal; ">http://www.servin.com/iphone/iPhone-File-IO.html</a><img src ="http://www.cppblog.com/inkcpp/aggbug/166787.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-02-29 15:20 <a href="http://www.cppblog.com/inkcpp/archive/2012/02/29/166787.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> iPhone开发网站、论坛、博客</title><link>http://www.cppblog.com/inkcpp/archive/2012/02/28/166673.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Tue, 28 Feb 2012 01:23:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/02/28/166673.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/166673.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/02/28/166673.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/166673.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/166673.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">http://cocoachina.com/ 大量iPhone开发资料，教学，经验，还有自曝。&nbsp;<br /><br />http://www.javaeye.com/forums/board/mobile iPhone开发论坛，人气鼎盛，大量自曝，还有Android的讨论&nbsp;<br /><br />http://developer.apple.com/iphone/ 苹果iPhone开发官方主页，提供大量实例、文档和教学视频&nbsp;<br /><br />http://developer.apple.com/contact/phone.html 苹果的支持&nbsp;<br /><br />http://www.stanford.edu/class/cs193p/ 斯坦福大学的iPhone课程，2009年4～6月，有pdf和视频下载&nbsp;<br /><br />http://bit.ly/RuaKq 飞机游戏iFighter的作者dr_watson写的iPhone游戏开发经典教学系列，有源码&nbsp;<br /><br />http://www.iphoneside.com/ iPhone达人的博客，很多有价值的资源下载，新闻和教程&nbsp;<br /><br />http://lichen1985.com/blog/ iPhone应用的作者，雨雪霏霏的iPhone博客，很多开发手记和心得&nbsp;<br /><br />http://blog.liuhongwei.cn/category/iphone/ iPhone开发博客，提供教学文章，经验分享，还有GAE&nbsp;<br /><br />http://www.javaeye.com/topic/422948 iPhone日本市场高手的自曝贴，第1个月就赚了2千刀，大量详细的数字和图片&nbsp;<br /><br />http://dev.iphonetw.net/ 台湾iPhone开发者论坛，有些教学文章和讨论&nbsp;<br /><br />http://www.otierney.net/objective-c.html.zh-tw.big5 Object-c简单教程&nbsp;<br /><br />http://icodeblog.com/ game的教程&nbsp;<br /><br />http://www.iphoneside.com/2009/06/abc123%EF%BC%9A%E4%B8%80%E4%B8%AA%E5%BC%80%E6%BA%90%E7%9A%84cocos2d%E6%B8%B8%E6%88%8F/ 游戏&nbsp;<br /><br />http://adeem.me/blog 简单教程&nbsp;<br /><br />http://www.iphoneexamples.com/ iPhone SDK Examples&nbsp;<br /><br />http://cocoadevcentral.com/d/learn_objectivec/ learn objective c&nbsp;<br /><br />补充：&nbsp;<br />www.weiphone.com&nbsp;<br /><br />http://stackoverflow.com/&nbsp;<br /><br />from:http://www.javaeye.com/topic/453221?page=1&nbsp;<br /><br />http://howtomakeiphoneapps.com&nbsp;<br /><br />http://icocoa.cn/ocsection/ocpractice Objective C 2.0 简明教程&nbsp;<br /><br />http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:index cocos2d教程&nbsp;<br /><br />http://www.premiumbeat.com/&nbsp; Sound and Music resources&nbsp;<br /><br />http://c.gzl.name/&nbsp; &#8220;我&#8221;的开发笔记&nbsp;<br /><br />http://www.cnblogs.com/HelloCG/category/172682.html //游戏开发中的数学和物理算法&nbsp;<br /><br />http://www.cocoachina.com/blog/blog.php?uid=11 //cocoachina dr_watson&nbsp;<br /><br />http://www.khronos.org/opengles/sdk/1.1/docs/man/ //OpenGL ES 1.1 Ref Page&nbsp;<br /><br />http://www.khronos.org/opengles/sdk/docs/man/&nbsp; //OpenGL ES 2 Ref Page&nbsp;<br /><br />http://www.lihuasoft.net/article/list.php?frmid=97&amp;page=1 //游戏算法&nbsp;<br /><br />http://three20.info/ three20控件&nbsp;<br />http://joehewitt.com/post/the-three20-project/</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">http://www.edumobile.org/iphone/ &nbsp; &nbsp; iphone教程</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">http://www.ourtuts.com/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;美术教程</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">http://www.appsamuck.com/ &nbsp; &nbsp; &nbsp; &nbsp;31个small project<br /><br />来源：<a href="http://blog.csdn.net/favormm/article/details/5158163">http://blog.csdn.net/favormm/article/details/5158163</a></p></p><img src ="http://www.cppblog.com/inkcpp/aggbug/166673.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-02-28 09:23 <a href="http://www.cppblog.com/inkcpp/archive/2012/02/28/166673.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>objective-c 中 @property中属性参数</title><link>http://www.cppblog.com/inkcpp/archive/2012/02/20/166067.html</link><dc:creator>淋雨的感觉</dc:creator><author>淋雨的感觉</author><pubDate>Mon, 20 Feb 2012 08:09:00 GMT</pubDate><guid>http://www.cppblog.com/inkcpp/archive/2012/02/20/166067.html</guid><wfw:comment>http://www.cppblog.com/inkcpp/comments/166067.html</wfw:comment><comments>http://www.cppblog.com/inkcpp/archive/2012/02/20/166067.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/inkcpp/comments/commentRss/166067.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/inkcpp/services/trackbacks/166067.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>Objective-C语言关键词，与@synthesize配对使用。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　功能：让编译好器自动编写一个与数据成员同名的方法声明来省去读写方法的声明。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　如：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　1、在头文件中：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@propertyint count;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效于在头文件中声明2个方法：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(int)count;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)setCount:(int)newCount;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　2、实现文件(.m)中</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@synthesizecount;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效于在实现文件(.m)中实现2个方法。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(int)count</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　{</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　return count;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)setCount:(int)newCount</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　{</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　count =newCount;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　以上等效的函数部分由编译器自动帮开发者填充完成，简化了编码输入工作量。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">&nbsp;</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>&nbsp;格式</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">&nbsp;</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>声明property的语法为：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(参数1,参数2)类型 名字;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　如：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(nonatomic,retain)UIWindow *window;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　其中参数主要分为三类：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　读写属性： （readwrite/readonly）</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　setter语意：（assign/retain/copy）</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　原子性： （atomicity/nonatomic）</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　各参数意义如下：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　readwrite</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　产生setter\getter方法</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　readonly</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　只产生简单的getter,没有setter。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　assign</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　默认类型,setter方法直接赋值，而不进行retain操作</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　retain</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　setter方法对参数进行release旧值，再retain新值。</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　copy</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　setter方法进行Copy操作，与retain一样</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong><br /></strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">使用assign:对基础数据类型 (NSInteger，CGFloat)和C数据类型(int,float, double, char, 等等)</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">使用copy： 对NSString</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">使用retain： 对其他NSObject和其子类</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;参数类型</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>参数中比较复杂的是retain和copy，具体分析如下：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">&nbsp;</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>getter 分析</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong><br />　　1、@property(nonatomic,retain)test* thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(nonatomic,copy)test* thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效代码：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)thetest</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　{</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　returnthetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　2、@property(retain)test* thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(copy)test*thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效代码：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)thetest</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　{</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　&nbsp;[thetestretain];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　return[thetest autorelease];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>setter分析</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　1、</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(nonatomic,retain)test*thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(retain)test* thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效于：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)setThetest:(test*)newThetest {</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　if (thetest!= newThetest) {</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　&nbsp;[thetestrelease];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　thetest= [newThetest retain];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　&nbsp;2、@property(nonatomic,copy)test*thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　@property(copy)test* thetest;</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　等效于：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　-(void)setThetest:(test*)newThetest {</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　if (thetest!= newThetest) {</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　[thetestrelease];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　thetest= [newThetest copy];</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>　　}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">　　</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>nonatomic关键字：</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">　　atomic是Objc使用的一种线程保护技术，基本上来讲，是防止在写未完成的时候被另外一个线程读取，造成数据错误。而这种机制是耗费系统资源的，所以在iPhone这种小型设备上，如果没有使用多线程间的通讯编程，那么nonatomic是一个非常好的选择。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><strong><br /><br />retain<br />代码说明<br />如果只是<u>@property</u>&nbsp;NSString*str;<br />则通过@synthesize自动生成的setter代码为：<br />-(void)setStr:(NSString*)value{<br />&nbsp;str=value;<br />}<br />如果是<u>@property</u>(retain)NSString*str;<br />则自动的setter内容为：<br />-(void)setStr:(NSString*)v{<br />&nbsp;if(v!=str){<br />&nbsp;&nbsp; [str release];<br />&nbsp;&nbsp; str=[v retain];<br />&nbsp;}<br />}</strong></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">&nbsp;</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">使用assign:对基础数据类型 (NSInteger，CGFloat)和C数据类型(int,float, double, char, 等等)</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">　　使用copy： 对NSString</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">使用retain：对其他NSObject和其子类<br /><br /><br />来源：<a href="http://blog.csdn.net/daydayupxx/article/details/6635201">http://blog.csdn.net/daydayupxx/article/details/6635201</a></p><img src ="http://www.cppblog.com/inkcpp/aggbug/166067.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/inkcpp/" target="_blank">淋雨的感觉</a> 2012-02-20 16:09 <a href="http://www.cppblog.com/inkcpp/archive/2012/02/20/166067.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>