views:

222

answers:

3

Hello,

I am making an application (iPhone app) which gets information (jokes) from an RSS feed, then populates the tableView. Now, would I take the RSS and store it in an array then populate the tableView, or what?

And how do I receive information from an RSS feed?

Thanks!

+6  A: 

Create a joke object and create an array full of the joke objects.

A simple example for pulling in rss feeds data is the seismic xml example on the apple developer samples site at: http://developer.apple.com/iphone/library/samplecode/SeismicXML/index.html

Buffernet
Hmmm, my code is full of Joke objects too.
Roger Nolan
+5  A: 

Store instances of NSDictionary in an NSArray. Populate the table's number of rows by returning the NSArray's count. Populate the table's rows by returning the NSArray's objectAtIndex for the specified row value.

rein
Thanks a lot man
Daniel Kindler
+3  A: 

You can use UITableViewDataSource to provide UITableView with data. You may want to have a look at lecture 8 of Stanford's CS193P which I believe explains how to use TableViews on iPhone (with code examples and explanation from Apple engineers).

If you poke around lecture notes you may find answer to your second question, how to get data over network - not RSS specific but you might get the idea (lecture 9? - not sure I'm not that far yet ...). Lectures are provided free over iTunesU and are of excellent quality explaining how to build iPhone apps.

stefanB