开发者

UITableViewCells with different cell sizes

开发者 https://www.devze.com 2022-12-27 06:25 出处:网络
Is it possible to have a UITableView that has a fixed height for all cells, except for the cell at the top (index 0)?

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, h开发者_StackOverflow中文版ow is this possible?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号