tags:

views:

68

answers:

2

I've seen some applications on the iPhone have an image on top of the tableView, which is straight forward and can be set with something like tableViewHeader.. and a picture below set with tableViewFooter. I recently seen an application where there is an image in the header, a table view, then another image below the footer, and then subsequently a couple UITableViewCells...

Is there a straight forward way to accomplish this without using two UITableViews in the same controller?

A: 

Use 2 sections.

KennyTM
+2  A: 

Multiple sections will accomplish this, you can also use this method on your UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;

in conjunction with a custom UITableView cell created in

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

This will allow you to specify a custom cell with the appropriate height that contains your image.

cory.m.smith