views:

45

answers:

2

Is it possible to have a UITableView that has a fixed height for all cells, except for the cell at the top (index 0)?

If so, how is this possible?

+1  A: 

You have to set the tableView’s delegate to an object that responds to tableView:heightForRowAtIndexPath:.

If your topmost cell does not have to be a UITableViewCell, you can also use a section header instead of a cell. See same protocol.

Nikolai Ruhe
A: 

I don't know about your app, but you might want to have a look at tableHeaderView instead of trying to change the top row. Here's a link

nevan
This is interesting, is there any way I can create my view in a XIB and then assign the tableHeaderView property?
Sheehan Alam
Yeah, you can create a view however you want and then set `tableHeaderView` equal to that view. Remember to size it appropriately.
nevan