Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top