Sheehan Alam
Sheehan Alam

Reputation: 60859

UITableViewCells with different cell sizes

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?

Upvotes: 0

Views: 976

Answers (2)

nevan king
nevan king

Reputation: 113747

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

Upvotes: 0

Nikolai Ruhe
Nikolai Ruhe

Reputation: 81848

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.

Upvotes: 2

Related Questions