<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Alex iPhone 之旅</title><subtitle type="text">动手，分享，交流</subtitle><id>http://feed.cnblogs.com/blog/u/39856/rss</id><updated>2011-04-27T15:29:11Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/39856/rss"/><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/11/26/1888716.html</id><title type="text">epub 电子书软件代码销售</title><summary type="text">epub 电子书软件代码销售本套代码用来读取epub 格式电子书。主要面向：有一定开发能力的人员，和有一定制作水平的朋友们。用途：自己开发学习，钻研，出appstore 应用，卖钱，加广告赚钱等。（如果你想出些epub的书，自己找资源打包上传，我想这是一笔不错的投资，长期利益，具体不多说了），发布阅读器，自己演化功能等。好处：方便快捷，epub 格式读取浏览，只要epub格式符合行业标准的，都能读...</summary><published>2010-11-26T06:03:00Z</published><updated>2010-11-26T06:03:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/26/1888716.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/26/1888716.html"/><content type="html">epub 电子书软件代码销售&lt;br /&gt;&lt;br /&gt;本套代码用来读取epub 格式电子书。&lt;br /&gt;主要面向：有一定开发能力的人员，和有一定制作水平的朋友们。&lt;br /&gt;用途：自己开发学习，钻研，出appstore 应用，卖钱，加广告赚钱等。（如果你想出些epub的书，自己找资源打包上传，我想这是一笔不错的投资，长期利益，具体不多说了），发布阅读器，自己演化功能等。&lt;br /&gt;好处：方便快捷，epub 格式读取浏览，只要epub格式符合行业标准的，都能读取。&lt;br /&gt;功能涵盖：打包epub读取，浏览，加入书签，字体修改，颜色修改，读取书签等。&lt;br /&gt;附送功能：打包txt文件读取，pdf读取，放大pdf，通过url下载txt之后读书，url 下载，下载后读取，预置地址浏览并下载epub,并读取下载的epub。&lt;br /&gt;技术方面：navbar, toolbar, tableview, webview 等UI控件不说了，业务逻辑，epub读取操作，sqlite 操作。&lt;br /&gt;缺点：本代码暂时不是完美框架，有点bug，没有美工，界面不好看。所以代码主要面向有一定能力的开发者和公司及个人。尤其附赠功能，没来得及测试，有大问题不负责。&lt;br /&gt;声明：代码不进行二次开发，修改的话，另算价格。（不过这个可能性不大，暂时忙）&lt;br /&gt;价格：8000／套 （iphone 程序员现在市场价格大家也支持，按着一个中等程序员，还得是学习能力强得，从调研到完成，我觉得怎么也得这个价）&lt;br /&gt;&lt;br /&gt;本品应该会近期提交appstore，可看后满意付款。或者严重有意的，adhoc并购买也行。&lt;br /&gt;&lt;br /&gt;最后，不刀，不墨迹，爽快的来。没时间折腾这东西了。&lt;br /&gt;&lt;br /&gt;联系方式：150－010－83305&lt;br /&gt;找alex，&lt;br /&gt;&lt;p&gt;alexliubo#gmail.com&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/000.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/001.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/003.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/004.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/002.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1888716.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/11/26/1888716.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/11/18/1880512.html</id><title type="text">an existing tansporter instance is currently uploading this package 解决方法</title><summary type="text">application loader 中，会出现这个问题，通常是他的bug，大概上传过程中very呢，结果你机器断电了，force quite等导致的。解决方式如下：To do this, open the tokens file found in /users/&lt;yourusername&gt;/.itmstransporter/UploadTokens/. You should see ...</summary><published>2010-11-18T02:36:00Z</published><updated>2010-11-18T02:36:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/18/1880512.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/18/1880512.html"/><content type="html">&lt;p&gt;application loader 中，会出现这个问题，通常是他的bug，大概上传过程中very呢，结果你机器断电了，force quite等导致的。&lt;/p&gt;&lt;p&gt;解决方式如下：&lt;/p&gt;&lt;p&gt;To do this, open the tokens file found in /users/&amp;lt;yourusername&amp;gt;/.itmstransporter/UploadTokens/. You should see one line of text at the top that refers to your current upload token. Simply delete this line and save the file. You should now be able to submit your app again.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;翻译就是：到这个路径下，拿记事本打开这个文件，然后里面有一行东西，删掉，重新保存文件即可继续上传了。&lt;/p&gt;&lt;p&gt;以上。 &lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1880512.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/11/18/1880512.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/11/03/1867804.html</id><title type="text">[iphone-320]Three20 的添加方式－－转</title><summary type="text">Three20是预编译静态库，最简单的方法是使用Xcode的依赖工程特性，下面是方法：1. 复制（Clone命令）three20 git（GitHub） 目录: `git clone git://github.com/joehewitt/three20.git`. 确保将其储存在一个常用位置，以便Xcode每次编译时来索引和访问2. 在 “three20/src”中找到 &amp;...</summary><published>2010-11-03T02:33:00Z</published><updated>2010-11-03T02:33:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/03/1867804.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/03/1867804.html"/><content type="html">&lt;span  style="font-family: 'Lucida Grande', Verdana, Arial, sans-serif; line-height: normal; font-size: 10px; color: #444444; "&gt;&lt;p&gt;Three20是预编译静态库，最简单的方法是使用Xcode的依赖工程特性，下面是方法：&lt;/p&gt;&lt;p&gt;1. 复制（Clone命令）three20 git（GitHub） 目录: `git clone git://github.com/joehewitt/three20.git`.&amp;nbsp; 确保将其储存在一个常用位置，以便Xcode每次编译时来索引和访问&lt;/p&gt;&lt;p&gt;2. 在 &amp;#8220;three20/src&amp;#8221;中找到 &amp;#8220;Three20.xcodeproj&amp;#8221; . 拖拽Three20.xcodeproj到您工程的根目录&amp;#8221;Groups and Files&amp;#8221;边栏中.在弹出对话框中去掉&amp;#8221;Copy items&amp;#8221;的对号，&amp;#8221;Reference Type&amp;#8221;选择&amp;#8221;Relative to Project&amp;#8221;然后点&amp;#8220;Add&amp;#8221;.&lt;/p&gt;&lt;p&gt;3. 现在要链接Three20库到您的工程。点击添加进来的&amp;#8221;Three20.xcodeproj&amp;#8221;，在&amp;#8220;Details&amp;#8221;表中，你会看到 libThree20.a. 打上文件右侧的对号&lt;/p&gt;&lt;p&gt;4. 现在你需要设置320库为你程序的依赖库，以便Xcode在编译的时候也会将320一起编译起来。展开左侧的&amp;#8220;Targets&amp;#8221;标签，双击您程序的&amp;#8220;目标&amp;#8221;文件。在&amp;#8220;General&amp;#8221;标签下，你会看到&amp;#8220;Direct Dependencies&amp;#8221;，点&amp;#8220;+&amp;#8221;号添加320库。&lt;/p&gt;&lt;p&gt;5. 现在你需要添加图片和字符串包到你的程序，找到&amp;#8221;Three20.bundle&amp;#8221;在&amp;#8221;three20/src&amp;#8221;中，然后拖拽到你的程序中。对话框里面&amp;#8220;Copy items&amp;#8221;别选，&amp;#8220;reference type&amp;#8221;选&amp;#8220;relative to project&amp;#8221;&lt;/p&gt;&lt;p&gt;6. 现在，你需要添加 Core Animation framework到你的工程。点击程序target，然后在frameworks里面添加 QuartzCore.framework就可以了（这个不是翻译的，原来的方法太麻烦了&lt;/p&gt;&lt;p&gt;7. 最后，我们需要让你的工程找得到320库的文件头。打开 &amp;#8220;Project Settings&amp;#8221;找到&amp;#8221;Build&amp;#8221;标签，找到 &amp;#8220;Header Search Paths&amp;#8221;双击它。添加到&amp;#8221;three20/src&amp;#8221;相对目录的地址。&lt;/p&gt;&lt;p&gt;8. 当你在 Project Settings, 找到 &amp;#8220;Other Linker Flags&amp;#8221;在&amp;#8221;Linker&amp;#8221;区,添加&amp;#8221;-ObjC&amp;#8221;和&amp;#8221;-all_load&amp;#8221;。&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;span  style="font-family: 'Lucida Grande', Verdana, Arial, sans-serif; line-height: 18px; font-size: 12px; color: #444444; "&gt;9. 完活了，在用320库的地方添加 #import &amp;#8220;Three20/Three20.h&amp;#8221; 就好了。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;来自：http://c.gzl.name/archives/389&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1867804.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/11/03/1867804.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867530.html</id><title type="text">[iphone-游戏]游戏中常用的数据组织方式和解析</title><summary type="text">1. XML最长用的方式了，这个标准也很好。不必多说。[代码]2. JSON[{{0,0}/*from*/,{30,30}/*to*/}/*move*/,{{0,0}/*from*/{30,30}/*to*/}/*attack*/]当然，以上的JSON并不是一个好的定义方式，不是很面向对象，但在仍然是一个可行的可解析的方式。细心的朋友可以仔细研究和XML的不同之处。3. 二进制FFFF(表示长度)...</summary><published>2010-11-02T12:55:00Z</published><updated>2010-11-02T12:55:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867530.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867530.html"/><content type="html">&lt;p&gt;1. XML&lt;/p&gt;&lt;p&gt;最长用的方式了，这个标准也很好。不必多说。&amp;nbsp;&lt;/p&gt;&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding:10px;"&gt;&lt;div&gt;&lt;!--&lt;br/ /&gt;&lt;br/ /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br/ /&gt;http://www.CodeHighlighter.com/&lt;br/ /&gt;&lt;br/ /&gt;--&gt;&lt;span style="color: #000000;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;protocol&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;move&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;from&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;point&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;0,0&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;point&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;from&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;to&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;point&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;30,30&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;point&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;to&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;mvoe&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;attack&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;....&lt;br /&gt;....&lt;br /&gt;....&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;attack&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;protocol&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2. JSON&lt;/p&gt;&lt;p&gt;&amp;nbsp;[{{0,0}/*from*/,{30,30}/*to*/}/*move*/,{{0,0}/*from*/{30,30}/*to*/}/*attack*/]&amp;nbsp;&lt;/p&gt;&lt;p&gt;当然，以上的JSON并不是一个好的定义方式，不是很面向对象，但在仍然是一个可行的可解析的方式。细心的朋友可以仔细研究和XML的不同之处。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3. 二进制&lt;/p&gt;&lt;p&gt;&amp;nbsp;FFFF(表示长度) 0001(move) &amp;nbsp;00000000(from:x=0) 00000000(from y=0) 00011110 (to x=30)&amp;nbsp;00011110&amp;nbsp;to (y=30) 0010 (attack)00000000( 00000000 00000000 00000000 0010 &amp;#8943;&amp;#8943;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;协议定义如此，比较简单，实际上更复杂和完善。&lt;/p&gt;&lt;p&gt;开始是长度 若干字节字定义&lt;/p&gt;&lt;p&gt;第一个协议的类型 用4比特，例如0001move，0010 attack&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;move协议的from的x，一个字节，&lt;/li&gt;&lt;li&gt;move协议的from的y，一个字节，&lt;/li&gt;&lt;li&gt;move协议的to的x，一个字节，&lt;/li&gt;&lt;li&gt;move协议的to的y，一个字节。&lt;/li&gt;&lt;li&gt;之后是第二个协议。0010，attack&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;以上是三种常用的数据结构定义方式。&lt;/p&gt;&lt;p&gt;解析和分析随后跟上。。。&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1867530.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867530.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867499.html</id><title type="text">[iphone-tabbar]如何自定义TabBarController</title><summary type="text">什么是TabBarControllertabbar，通常情况下用来下面互相切换ViewControllers。使用方式有几种，其中最常见的就是指定tabArray，里面按着顺序存放controllers对象做为下面切换。这种操作可以放在AppDelegate里面，最终，加入window上。 深入理解TabBarController本人曾尝试把TabBarController，tabbar的hidd...</summary><published>2010-11-02T12:13:00Z</published><updated>2010-11-02T12:13:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867499.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867499.html"/><content type="html">&lt;p&gt;&lt;span style="background-color: #ff9900; "&gt;什么是TabBarController&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;tabbar，通常情况下用来下面互相切换ViewControllers。使用方式有几种，其中最常见的就是指定tabArray，里面按着顺序存放controllers对象做为下面切换。这种操作可以放在AppDelegate里面，最终，加入window上。 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: #ff9900; "&gt;深入理解TabBarController&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;本人曾尝试把TabBarController，tabbar的hidden＝YES，之后发现下面黑色的tabbar没有了，但是会有白色的东西覆盖在上面。background Color 设置为clear都不行。 后来发现tabbar的现实内容的地方，设置的高度小了。所以导致看起来是白色的。后来把内容部分拉长，tabbar虽然还在下面那个位置，但是hidden之后，就不会有那个白色的效果了。 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( [[self.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentView = [self.view.subviews objectAtIndex:1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentView = [self.view.subviews objectAtIndex:0];&lt;/p&gt;&lt;p&gt;得到内容view&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;。 &lt;span style="background-color: #ff9900; "&gt;如何自定义TabBarController&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1。第一种方式是完全重写TabBarController，使用view来代替，上面都是button，工作量非常大，有一点就是各个层级之间的切换无法弄的太透彻。什么时候在上面，下面，什么时候隐藏。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2。第二种是继承一个UItabbarController，然后在这个子类的上层加一个View。这个的好处在于切换直接通过hide的tabbar进行中转就行了。&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;中转函数。- (void)switchView:(id)sender&lt;/p&gt;&lt;p&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; int index = [self.subviews indexOfObject:sender];&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tabbarctrl.selectedIndex = index;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;最后，当我们需要badgeVale，别忘了去320找找好用的。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1867499.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/11/02/1867499.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860365.html</id><title type="text">[iphone-game] 介绍 Astar (a*) A星算法在iPhone/iPad 上的应用</title><summary type="text">本文并不介绍如实去实现a star 算法，也不去介绍什么是a star 算法。如果这方面不太了解了。去文章的末尾两个链接可以先补习一下。本文侧重于在游戏中实际应用。为什么要使用a star 算法：游戏中，我们常常会遇到一些任务或者是怪物的路径移动问题，尤其是有原本的地图的情况下。比如，任务从A走到B，如果直接过去，中间是有条河的，肯定不行。如果绕过去，两侧没有河，一侧是山，一侧是桥，山不能走，挡路...</summary><published>2010-10-25T06:17:00Z</published><updated>2010-10-25T06:17:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860365.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860365.html"/><content type="html">&lt;p&gt;本文并不介绍如实去实现a star 算法，也不去介绍什么是a star 算法。&lt;/p&gt;&lt;p&gt;如果这方面不太了解了。去文章的末尾两个链接可以先补习一下。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;本文侧重于在游戏中实际应用。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 14pt; background-color: #ff9900; "&gt;为什么要使用a star 算法：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;游戏中，我们常常会遇到一些任务或者是怪物的路径移动问题，尤其是有原本的地图的情况下。比如，任务从A走到B，如果直接过去，中间是有条河的，肯定不行。如果绕过去，两侧没有河，一侧是山，一侧是桥，山不能走，挡路，只有桥。 就算任务从桥过去，如何能保证正确的从桥上通过呢？&lt;/p&gt;&lt;p&gt;于是我们引入了a star 算法，当然他在游戏中也并不只是这一个应用，只是举例如此引出：&lt;/p&gt;&lt;p&gt;我们规定地图，是由一个二维数组组成（当然你说一维也可以），里面仅仅存储类似，0，1，2，3 这样的数据，通常情况下只有0，1。例如0代表不能行走，1代表可行走。 这0，1的二维数组是和一张地图对应起来的。我们尝试着把地图无线小的分割成无数个矩形，或者正方形。例如，将5000x5000的大地图，以每个25像素为宽度和高度，分成200x200的一个二维数组。每个数组里面的0代表无法行走。如果从地图的左上角那50x50的一个小范围，是一颗树来看的话，那么对应的二维数组里面，00，01，10，11 这四个值都是0。以此类推，通过某种图像处理的方式，我们可以生成一个完整的200x200的二维数组。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;如何生成这个地图，我并没有什么太好的方式，可以使用一张粗略的颜色图片，2个颜色，大体的花出来路径，例如红色代表可走，其他颜色不可走，和原本彩色地图按位计算得出。我也是猜测。&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 14pt; background-color: #ff9900; "&gt;如何使用a star 算法：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;既然我们已经有了一个和地图对应的二维数组，即可通过a star 算法尝试着去寻找某一个数组里面的&amp;#8216;1&amp;#8217;，到下一个&amp;#8216;1&amp;#8217;，所 花费的最少的cost 的路径了。&lt;/p&gt;&lt;p&gt;下面以实际人物移动为例，具体说名下返回的路径（cocos2d为例）：&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;返回的路径无非就是一些从起始点到重点的坐标集合，集合中的每个元素都是一个人物将要移动的位置。&amp;nbsp;&lt;/p&gt;&lt;p&gt;1。使用库函数ccMoveTo/By等， 依次移动。缺点是移动中断比较难做。&lt;/p&gt;&lt;p&gt;2。使用坐标变化方式，实时刷新人物坐标。维护移动了的节点，没有走的节点。 通过某种圈地函数，判断是否已经走到了制定的坐标位置。&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 14pt; background-color: #ff9900; "&gt;何时使用a star 算法：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font: normal normal normal 12px/normal 'Hiragino Kaku Gothic ProN'; color: #000000; font-size: 12pt; "&gt;何&lt;/span&gt;&lt;span style="font: normal normal normal 12px/normal 'Heiti SC Light'; color: #000000; font-size: 12pt; "&gt;时&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;使用往往是人物的&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;移动&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;是收到一定的限制，在地&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;图&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;中并不是个坐&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;标&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;都可以走的。往往客&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;户&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;端本地和服&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;务&lt;/span&gt;&lt;span style="font: normal normal normal 14px/normal 'Hiragino Mincho ProN'; font-size: 12pt; "&gt;器&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;使用的是同一份地图数组，当客户端进行移动的时候，会将移动了的坐标发送到服务器去，如果服务器发现这一组数据是非法的，将会把人物进行拉回。但通常情况下，我们并不采取人物本身的初始移动，由服务器来控制行走。这样是完全不可行的，人物还未走，就需要发送一条移动请求，返回需要走的坐标，很少有人尝试这一种设计。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: STSong; line-height: normal; color: #50504d; font-size: 12pt; "&gt;下面说一种本不应该使用a star 算法的例子，例如某种人物怪物或者其它角色，他的移动通常是一条固定的线路，那么使用a star算法就画蛇添足了。 每次寻路的结果也是一样的，往往耗费了性能。例如人物杀怪，怪物如何移动直接有服务器给出即可。&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: #ff9900; font-size: 12pt; "&gt;a star 算法的性能：&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;这里我倒是没有具体的统计数据，不过就ipad的性能来说，计算2000x2000的地图的时候一般不会出现让人察觉的停顿方式。如果考虑使用开一个新的线程实现，也没有这个必要。从用户体验角度来看，虽然单开的这个线程在计算完成了路径后，人物开始移动，和使用一个线程实现，效果都是一样的，慢的话我们都需要等待。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;通常并不建议去使用这样一种地图方式：上下都有大片的可走区域，而中间只留下一条可走的路，从算法本身扩散式的寻找来看，性能是很低下的。 因为别忘了我们使用的是移动的平台。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: #ff9900; font-size: 12pt; "&gt;关于Astar 的理论介绍：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: #ff9900; font-size: 12pt; "&gt;http://www.cnblogs.com/gansaishi2008/articles/1254603.html&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: #ff9900; font-size: 12pt; "&gt;http://wenku.baidu.com/view/eaa14f11f18583d049645992.html&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1860365.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860365.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860292.html</id><title type="text">[iphone]XML 解析 之 TBXML 介绍</title><summary type="text">总的来说，iphone 上可用的解析XML的方式大概有2种类型的。1.Tree-based API：这种API的处理方式是将XML的结构看成是树，然后把树的各部分看成一个对象来处理，这就是我们说的DOM (Document Object Model)方式。在iPhone的SDK里包含了一个libxml2的框架(Framework)就能进行DOM解析方式。Google的GDataXML也是基于lib...</summary><published>2010-10-25T04:48:00Z</published><updated>2010-10-25T04:48:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860292.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860292.html"/><content type="html">&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;&amp;nbsp;总的来说，iphone 上可用的解析XML的方式大概有2种类型的。&lt;/span&gt;&lt;span style="font-family: Tahoma; line-height: 25px; font-size: small; "&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;1.Tree-based API&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;：这种&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;API&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的处理方式是将&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;XML&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的结构看成是树，然后把树的各部分看成一个对象来处理，这就是我们说的&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;DOM (Document Object Model)&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;方式。在&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;iPhone&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;SDK&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;里包含了一个&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;libxml2&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的框架&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;(Framework)&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;就能进行&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;DOM&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;解析方式。&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;Google&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;GDataXML&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;也是基于&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;libxml2&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的，因此在使用&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;GDataXML&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;之前，你需要先导入&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;libxml2&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;2.Event-driven API:&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;这种方式通常用于解析基于的事件，&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;SAX&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;解析方式就是这种解析方式的代表。在&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;iPhone&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;开发的，也可以利用这种方式来解析&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;XML&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;，不过这可不是&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;Iphone SDK&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的属性啊，而是&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;Objective-C&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的功能。在&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;Objectvie-C&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;种有专门解析&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;XML&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;的类&lt;/span&gt;&lt;span class="s2" style="font-size: 12pt; "&gt;NSXMLParser&lt;/span&gt;&lt;span class="s1" style="font-size: 12pt; "&gt;。&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: Tahoma; line-height: 25px; font-size: 12px; "&gt;&lt;p class="p5"&gt;&lt;span class="s2"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;span  style="font-family: 'Hoefler Text'; line-height: normal; font-size: 14px; color: #50504d; "&gt;r TBXML are:&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;ul style="list-style-type: none"&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 20.0px; font: 14.0px 'Hoefler Text'; color: #50504d"&gt;&lt;span style="font: 12.0px Helvetica; color: #000000"&gt;&lt;img src="webkit-fake-url://75F433A6-7EAA-40B5-B59C-50900AA022F9/bullet_pp_2.png" alt="bullet_pp_2.png" /&gt;&lt;/span&gt;XML files conforming to the &lt;a href="http://www.w3.org/TR/REC-xml"&gt;&lt;span style="font: 14.0px Helvetica"&gt;W3C&lt;/span&gt; &lt;span style="font: 14.0px Helvetica"&gt;XML spec 1.0&lt;/span&gt;&lt;/a&gt; should be passable&lt;span style="font: 14.0px 'Lucida Grande'"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 20.0px; font: 14.0px 'Hoefler Text'; color: #50504d"&gt;&lt;span style="font: 12.0px Helvetica; color: #000000"&gt;&lt;img src="webkit-fake-url://75F433A6-7EAA-40B5-B59C-50900AA022F9/bullet_pp_2.png" alt="bullet_pp_2.png" /&gt;&lt;/span&gt;XML parsing should incur the fewest possible resources&lt;span style="font: 14.0px 'Lucida Grande'"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 20.0px; font: 14.0px 'Hoefler Text'; color: #50504d"&gt;&lt;span style="font: 12.0px Helvetica; color: #000000"&gt;&lt;img src="webkit-fake-url://75F433A6-7EAA-40B5-B59C-50900AA022F9/bullet_pp_2.png" alt="bullet_pp_2.png" /&gt;&lt;/span&gt;XML parsing should be achieved in the shortest possible time&lt;span style="font: 14.0px 'Lucida Grande'"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 20.0px; font: 14.0px 'Hoefler Text'; color: #50504d"&gt;&lt;span style="font: 12.0px Helvetica; color: #000000"&gt;&lt;img src="webkit-fake-url://75F433A6-7EAA-40B5-B59C-50900AA022F9/bullet_pp_2.png" alt="bullet_pp_2.png" /&gt;&lt;/span&gt;It shall be easy to write programs that utilise TBXML&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Design Goals&lt;/p&gt;&lt;p&gt;Check out this post for a good comparison of XML parsers. &amp;#8220;&lt;a href="http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project"&gt;How To Chose The Best XML Parser for Your iPhone Project&lt;/a&gt;&amp;#8221;&lt;/p&gt;&lt;p&gt;Performance&lt;/p&gt;&lt;ul style="list-style-type: none"&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 14.0px Helvetica; color: #50504d"&gt;&lt;a href="http://www.tbxml.co.uk/TBXML/TBXML.zip"&gt;TBXML.zip&lt;/a&gt; &lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 14.0px Helvetica; color: #50504d"&gt;&lt;a href="http://www.tbxml.co.uk/TBXML/TBXML-Books.zip"&gt;TBXML-Books.zip&lt;/a&gt;&lt;span style="font: 12.0px 'Lucida Grande'"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 14.0px 'Hoefler Text'; color: #50504d"&gt;&lt;a href="http://www.tbxml.co.uk/TBXML/Changes.html"&gt;Version changes&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;font  color="#50504D" face="'Hoefler Text'"&gt;&lt;span  style="line-height: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;span style="font-family: Tahoma; line-height: 25px; font-size: 12px; "&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;&amp;nbsp;介绍一种轻量级的XML解析方式，TBXML。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;按着以上两个分类的话，算是DOM 的解析方式。需要去找寻root 节点。然后按着名字顺序查找。找到某个节点之后，如果需要找寻孩子信息，那么使用这个节点做为parent，继续向里面查找。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;正如他的官方介绍所说TBXML 具有如下特点：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;速度快，效率高，占用的额外资源少。耗时短。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;本人看来，用起来确实方便。上手容易，快速。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;常用的初始化方式有。如下几种。&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)tbxmlWithURL:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSURL&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aURL;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)tbxmlWithXMLString:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLString;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)tbxmlWithXMLData:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSData&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aData;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)tbxmlWithXMLFile:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLFile;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)tbxmlWithXMLFile:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLFile fileExtension:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aFileExtension;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;- (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)initWithURL:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSURL&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aURL;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;- (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)initWithXMLString:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLString;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;- (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)initWithXMLData:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSData&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aData;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;- (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)initWithXMLFile:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLFile;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;- (&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;id&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;)initWithXMLFile:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLFile fileExtension:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aFileExtension;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;@end&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span style="font-size: 12pt; "&gt;静态方法也不过7种而已。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;// ================================================================================================&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;//&lt;/span&gt;&amp;nbsp; &lt;span style="font-size: 12pt; "&gt;TBXML Static Functions Interface&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;// ================================================================================================&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;@interface&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; TBXML (StaticFunctions)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) elementName:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLElement;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) textForElement:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLElement;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) valueOfAttributeNamed:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; *)aName forElement:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLElement;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) attributeName:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLAttribute&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLAttribute;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) attributeValue:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLAttribute&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLAttribute;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) nextSiblingNamed:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aName searchFromElement:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aXMLElement;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+ (&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*) childElementNamed:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aName parentElement:(&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;*)aParentXMLElement;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style="font-family: Menlo; line-height: normal; color: #bb2d9d; font-size: 12pt; "&gt;@end&lt;/span&gt;&amp;nbsp;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;上一个本人实际的例子，大家一看就行，你懂的。。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;+(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; *)getOPFFolderName:(&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; *)prefixName&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//doc/ldj/META-INF/container.xml;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//&amp;lt;container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;&amp;lt;rootfiles&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;&amp;lt;rootfile full-path="OPS/fb.opf" media-type="application/oebps-package+xml"/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;&amp;lt;/rootfiles&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;&amp;lt;/container&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt; *path = [&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSString&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;stringWithFormat&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:[&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;NSHomeDirectory&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;()&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;stringByAppendingPathComponent&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;@"/Documents/%@/META-INF/container.xml"&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;],prefixName];&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXML&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; *containeXML = [&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXML&lt;/span&gt; &lt;span style="color: #31595d; font-size: 12pt; "&gt;tbxmlWithURL&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;:[&lt;/span&gt;&lt;span style="color: #713ea3; font-size: 12pt; "&gt;NSURL&lt;/span&gt; &lt;span style="color: #3e1f7c; font-size: 12pt; "&gt;fileURLWithPath&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;:path]];&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt; *root = containeXML.&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;rootXMLElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;//TBXMLElement *container= [TBXML childElementNamed:@"container" parentElement:root];&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXMLElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt; *rootfile = [&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXML&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;childElementNamed&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;span style="color: #d12c26; font-size: 12pt; "&gt;@"rootfile"&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;parentElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXML&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;childElementNamed&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;span style="color: #d12c26; font-size: 12pt; "&gt;@"rootfiles"&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;parentElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; "&gt; &amp;nbsp; root]];&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #bb2d9d; font-size: 12pt; "&gt;return&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt; [&lt;/span&gt;&lt;span style="color: #4e8186; font-size: 12pt; "&gt;TBXML&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;valueOfAttributeNamed&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:&lt;/span&gt;&lt;span style="color: #d12c26; font-size: 12pt; "&gt;@"full-path"&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; "&gt;forElement&lt;/span&gt;&lt;span style="color: #000000; font-size: 12pt; "&gt;:rootfile];&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: Menlo; line-height: normal; font-size: 12pt; "&gt;}&lt;/span&gt;&amp;nbsp;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span style="font-family: verdana, 'courier new'; line-height: 21px; font-size: 12pt; "&gt;参考文章：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;http://www.tbxml.co.uk/TBXML/TBXML_Free.html&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 12pt; "&gt;http://www.norkoo.com/show/New_Tech/IPhone/dfdikhjijkagekigicgkgcdkiheb.aspx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family: Tahoma; line-height: 25px; font-size: 12px; "&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1860292.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/10/25/1860292.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858785.html</id><title type="text">[iphone/ipad]iEpuber, ePub 电子书阅读器 （非公益非技术）</title><summary type="text">额。。。这篇文章不谈技术。只谈产品和推广。暂无开源的意思。产品主导阅读ePub格式电子书，当然，也会支持其它简单的阅读方式。类似PDF阅读，已经实现读取。txt 读取。目前以epub为主。代码打算用于app store 程序发布，商务合作，按份出售等用途。 将要实现的工程暂时分3期实现：1期：epub 本地格式读取实现1－1书籍列表1－2章节列表1－3内容读取 2期：2－1支持下载并更新2－2需要...</summary><published>2010-10-22T15:33:00Z</published><updated>2010-10-22T15:33:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858785.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858785.html"/><content type="html">&lt;p&gt;额。。。这篇文章不谈技术。只谈产品和推广。暂无开源的意思。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;产品主导阅读ePub格式电子书，当然，也会支持其它简单的阅读方式。类似PDF阅读，已经实现读取。txt 读取。目前以epub为主。&lt;/p&gt;&lt;p&gt;代码打算用于app store 程序发布，商务合作，按份出售等用途。 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;将要实现的工程暂时分3期实现：&lt;/p&gt;&lt;p&gt;1期：&lt;/p&gt;&lt;p&gt;epub 本地格式读取实现&lt;/p&gt;&lt;ul&gt;&lt;li&gt;1－1书籍列表&lt;/li&gt;&lt;li&gt;1－2章节列表&lt;/li&gt;&lt;li&gt;1－3内容读取 &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;2期：&lt;/p&gt;&lt;ul&gt;&lt;li&gt;2－1支持下载并更新&lt;/li&gt;&lt;li&gt;2－2需要自主提供下载源&lt;/li&gt;&lt;li&gt;2－3将书籍列表分成两个部分，下载和原有 &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;3期：&lt;/p&gt;&lt;ul&gt;&lt;li&gt;3－1支持字体，背景，颜色，设置&lt;/li&gt;&lt;li&gt;3－2主题配色&lt;/li&gt;&lt;li&gt;3－3其它类似书签等功能。还没策划完全。 &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;后期工作就是UI优化等。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;＝＝＝＝＝＝＝＝10月22日更新＝＝＝＝＝＝＝＝＝＝＝＝&lt;/p&gt;&lt;p&gt;基本完成第一期工作，上点图好了。具体不废话。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/epub1.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/epub2.png" height="485" width="323" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/epub2.2.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/epub3.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://images.cnblogs.com/cnblogs_com/alexliu/epuber/epub4.png" border="0" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1858785.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858785.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858780.html</id><title type="text">[iphone]技术杂谈</title><summary type="text">好吧。我承认，最近实在是太懒了。也不是很懒吧，就是忙的顾不过来了，好久没更新了。还好，最近稍微好一点，打算总结一下最近的生活，希望能在接下来的半个月能够完成，当然，主要还是技术方面的。半个月之后，又要匆匆的去开始又一段新鲜的旅程了。订个目标，一天一篇吧。哈哈。 先列一下需要总结的东西好了：完成之后会加链接1。iEpuber， iphone 读取epub 格式电子书，阅读器（非技术非公益）2。Ast...</summary><published>2010-10-22T15:16:00Z</published><updated>2010-10-22T15:16:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858780.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858780.html"/><content type="html">&lt;p&gt;好吧。我承认，最近实在是太懒了。也不是很懒吧，就是忙的顾不过来了，好久没更新了。&lt;/p&gt;&lt;p&gt;还好，最近稍微好一点，打算总结一下最近的生活，希望能在接下来的半个月能够完成，当然，主要还是技术方面的。&lt;/p&gt;&lt;p&gt;半个月之后，又要匆匆的去开始又一段新鲜的旅程了。&lt;/p&gt;&lt;p&gt;订个目标，一天一篇吧。哈哈。 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;先列一下需要总结的东西好了：完成之后会加链接&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1。iEpuber， iphone 读取epub 格式电子书，阅读器（非技术非公益）&lt;/p&gt;&lt;p&gt;2。Astar 算法（A*) 在iphone／ipad 游戏上的应用 Objective－C 版本&lt;/p&gt;&lt;p&gt;3。TBXML 轻量级XML 解析器介绍&lt;/p&gt;&lt;p&gt;4。Socket 服务器通信&lt;/p&gt;&lt;p&gt;5。ASIHttpRequest 介绍 和 使用&lt;br /&gt;&lt;/p&gt;&lt;p&gt;6。游戏中常用的数据传输方式和解析&lt;/p&gt;&lt;p&gt;7。如何自己做一个adMob&lt;/p&gt;&lt;p&gt;8。Cocos2d 实践过程中的一点心得总结 （一）性能方面&lt;br /&gt;&lt;/p&gt;&lt;p&gt;9。Cocos2d 实践过程中的一点心得总结 （二）UI显示结合&lt;/p&gt;&lt;p&gt;10。浅谈iPhone 数据持久性 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;11。HTML＝JavaScrip＝各种Socket 到 iphone/ipad 的移植&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1858780.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/10/22/1858780.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/AlexLiu/archive/2010/08/02/1790877.html</id><title type="text">[IPHODROID]很期待，iphone能装上andriod....</title><summary type="text">3G专用iPhoDroid系统最新版IPHODROID 1SHOT R13即将在8月2日（北京时间大约3日）放出，此版本系统与之前版本相比安装变得更简单，只需轻轻一点，10分钟之内便可完成安装，此版本只需USB安装，完全不再需要WiFi与SSH，并且完全兼容iOS4（之前的版本需要降级到3.1.2）全新的OpeniBoot引导（Quadra）将内置Ultrasn0w超雪解锁打电话、发短信、上网...均可正常使用更多的改进（如待机时间）等有待测试iOS与Android双系统，喜欢折腾的童鞋不要错过哦~weiphone上听来的小道消息。可惜就是没有3G这个型号的机器。不过对我来说也是好消息了，至少</summary><published>2010-08-02T15:38:00Z</published><updated>2010-08-02T15:38:00Z</updated><author><name>AlexLiu</name><uri>http://www.cnblogs.com/AlexLiu/</uri></author><link rel="alternate" href="http://www.cnblogs.com/AlexLiu/archive/2010/08/02/1790877.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/AlexLiu/archive/2010/08/02/1790877.html"/><content type="html">&lt;span style="color: #4a4a4a; font-family: Arial; line-height: 24px; border-collapse: collapse; "&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;3G专用iPhoDroid系统最新版&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;IPHODROID 1SHOT R13&lt;/span&gt;即将在&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;8月2日（北京时间大约3日）&lt;/span&gt;放出，&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;此版本系统与之前版本相比安装变得更简单，&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;只需轻轻一点，&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;10分钟之内&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;便可完成安装，&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;此版本&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;只需USB安装&lt;/span&gt;，&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;完全&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;不再需要WiFi与SSH&lt;/span&gt;，&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;并且&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;完全兼容iOS4&lt;/span&gt;（之前的版本需要降级到3.1.2）&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;全新的&lt;/strong&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;OpeniBoot引导（&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #ff3300; "&gt;Quadra&lt;/span&gt;）将内置Ultrasn0w超雪解锁&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;打电话、发短信、上网...均可正常使用&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;更多的改进（如待机时间）等有待测试&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center" 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: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; word-wrap: break-word; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #000000; "&gt;&lt;strong style="outline-style: none; outline-width: initial; outline-color: initial; "&gt;&lt;span style="outline-style: none; outline-width: initial; outline-color: initial; color: #6600cc; "&gt;&lt;font size="4" style="outline-style: none; outline-width: initial; outline-color: initial; line-height: 1.5em; "&gt;iOS与Android双系统，喜欢折腾的童鞋不要错过哦~&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;weiphone上听来的小道消息。可惜就是没有3G这个型号的机器。&lt;/p&gt;&lt;p&gt;不过对我来说也是好消息了，至少可能不需要再专门购置一款可以跑andriod的机器了。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;a href="http://files.cnblogs.com/AlexLiu/MyCoffee.ipa.zip"&gt;/Files/AlexLiu/MyCoffee.ipa.zip&lt;/a&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://www.cnblogs.com/AlexLiu/aggbug/1790877.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/AlexLiu/archive/2010/08/02/1790877.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
