As a general approach, you just need to set the appropriate controller class as a delegate for the UITableView in question, and then implement the following methods:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
However, I would recommend reading the "Apple " Table Programming Guide " - it will explain much more than a simple code example, and is reasonably easy to follow.
As soon as you do this, if you are still following the sample code, just load one of the projects in the โRelated Code Sampleโ section of the UITableView Class Link . (If you do this in the Apple doc viewer application in Xcode, it will automate the loading, etc. And it will output the project in Xcode for you.)
source share