<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iPhone SDK develop &#38; programming tips &#187; UITableView</title>
	<atom:link href="http://www.flyblog.info/tag/uitableview/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flyblog.info</link>
	<description>ideas for programming</description>
	<lastBuildDate>Fri, 20 May 2011 09:49:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone SDK 开发：sqlite ＋ UITableView 实现大数据浏览</title>
		<link>http://www.flyblog.info/catprogramming/371.html</link>
		<comments>http://www.flyblog.info/catprogramming/371.html#comments</comments>
		<pubDate>Tue, 09 Jun 2009 09:48:39 +0000</pubDate>
		<dc:creator>Flyblog</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[UITableView]]></category>

		<guid isPermaLink="false">http://www.flyblog.info/?p=371</guid>
		<description><![CDATA[在开始学习iPhone开发的时候就捉摸 AppStore这样的程序时怎么实现的， 动态的从服务器抓取内容，再在表格中显示。 伴随着twitter的火爆， 越来越多的软件实现了此种方式来显示twitter消息， 不巧公司也要做twitter相关的东西，正好借此机会试探着实现一下这种显示功能。
iPhone程序和传统的桌面程序的最大不同在于内存有限， 管理内存成了iPhone开发中时时刻刻需要谨记的事情。类似的功能在桌面程序上无非是将down下来的数据缓存于内存中，需要的时候画出来即可。 此法在iPhone上切不可行，虽然UITableViewCell可与reuse重复使用以节约内存使用量， 但是数据还是需要host在array或者dictionary中，必然导致程序实用大量内存儿崩溃退出。
还好，iPhone系统内置sqlite微型数据库， 这么好的查询插入引擎不善用那就是罪过了。。。
言归正传， 基本思路是这样的： 从服务器读取内容，以twitter为例，先创建消息数据表
create table public_timelines (id integer primary key autoincrement, user varchar(40),\
				   userurl text,body text, created real, created_string text,\
				   imageurl text, ordernum int, userid varchar(20), user_screenname varchar(40));
获取public timelines得到以xml形式存在的message条目，解析xml后将每条消息插入数据表， 写入成功后发送reload消息给table以重新填充表格单元内容， 如图

如果消息记录超过一条， 记得在- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
中返回消息记录 ＋ 1， 因为最后一个cell需要实现 Get More &#8230;功能
就像上一步说的， 点击最后一个cell也就是Get More&#8230;时，在此从服务器获取 [...]]]></description>
		<wfw:commentRss>http://www.flyblog.info/catprogramming/371.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone表格中划动删除单元格</title>
		<link>http://www.flyblog.info/catprogramming/196.html</link>
		<comments>http://www.flyblog.info/catprogramming/196.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:01:09 +0000</pubDate>
		<dc:creator>Flyblog</dc:creator>
				<category><![CDATA[编程开发]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[UITableView]]></category>
		<category><![CDATA[划动删除]]></category>

		<guid isPermaLink="false">http://www.flyblog.info/catprogramming/196.html</guid>
		<description><![CDATA[iPhone上的程序很多用表格UITableView来显示数据、做布局等。 当用UITableView显示数据是经常会需要删除、插入数据条目。 SDK提供两种删除UITableViewCell的方法]]></description>
		<wfw:commentRss>http://www.flyblog.info/catprogramming/196.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

