Should I store it in an array or what?

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

And how can I get information from the RSS feed?

Thank!

0


source to share


3 answers


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



+5


source


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



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

+6


source


You can use UITableViewDataSource to provide data to UITableView. You might want to take a look at Lecture 8 from Stanford CS193P , which I believe explains how to use TableViews on the iPhone (with code examples and explanations from Apple).

If you scrap your lecture notes, you may find the answer to your second question: how to get the data over the web, not RSS, but you can get this idea (Lecture 9?) - not sure if I'm not that far yet ..) ... The lectures are provided free of charge through iTunesU and are of excellent quality explaining how to create iPhone apps.

+3


source







All Articles