views:

37

answers:

1

I am just trying to create a simple Twitter app. Currently I have a UITableViewController that shows everyones name and pictures in the cells. When the cell is clicked, it pushes a new UIViewController that has a UIImageView and a UITableView. Their name is displayed as the title on the Navigation Bar and their picture is shown in the UIImageView. I have an NSArray that has a list of their statuses that i am trying to add to the UITableView. What is the easiest way to do this? thank you

A: 

You need to implement, at a minimum, the UITableViewDataSource protocol, and set the implementing object ('self' is perfectly fine if you're implementing it from the view controller you created it in) to the 'dataSource' property of your UITableView.

This protocol will let your class say how many rows it has (which should be the size of your array), then for the tableView:cellForRowAtIndexPath: you can populate the content of each tweet (again, relating the IndexPath row against your array).

ChrisW