Nauman.Khattak
Nauman.Khattak

Reputation: 641

How to display Data from RSS Feed in Parts in Iphone Application

I am displaying RSS feeds in my table view. as there are hundred of feeds so my application takes lots of time to load them and display them i want to load just first 25 feed and display them in Table view and when User Click on More 25 application load next 25 and display them. Any Idea........... :) I am using TouchXML to parse XML Feed.

Upvotes: 4

Views: 671

Answers (3)

live-love
live-love

Reputation: 52424

Take a look at the SeixmicXML example and the LazyTableImages sample code on the apple developer web site. They use threading (NSOperation) for parsing batches of data and load them on a table view.

Upvotes: 0

Chandan Shetty SP
Chandan Shetty SP

Reputation: 5117

While parsing if you encounter a feed store it in a arry... if the array count is 25 display display it in table view continue parsing if the user click on more button display next 25 elements in the array to the tableview.

as vodkhang told Use thread if you want to boost performance.

Upvotes: 0

vodkhang
vodkhang

Reputation: 18741

It depends on the webservice that provides you the RSS feed. If you can request them to load just 25 feeds, then the server side is ok

Now is the client side, you need a UITableView as usual. In the numberOfRows delegate method, you return 25 (also need to +1 for last cell), and shows the first 25 feeds. At the bottom of the table view the last cell can be a cell with text "Load More", then here, you started to load more

You can also put the loading and parsing RSS feed in thread, this will boost your performance

Upvotes: 1

Related Questions