开发者

How can I programmatically increase the height of the cells in my UITableView?

开发者 https://www.devze.com 2023-01-14 16:53 出处:网络
I\'m diving into iOS 开发者_运维知识库development and I just finished reading Apple doc \"A closer look at table view cells\", but I couldn\'t find the answer to my question.If I have a UITableView in

I'm diving into iOS 开发者_运维知识库development and I just finished reading Apple doc "A closer look at table view cells", but I couldn't find the answer to my question. If I have a UITableView in one of the views of my iOS app, how can I increase the height of the cells? I assume this is something I would do in the cellForRowAtIndexPath delegate method, and it would probably involve adjusting the frame of the cell, but I don't understand how to do that without screwing up the position of the cells, which is currently determined by the iOS. Anyhow, I'm clearly confused, can anyone explain how I can increase the height of the cells in my UITableView?

Thanks so much in advance for your help!


You can do so either with the

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

UITableViewDelegate method or the rowHeight property of UITableView.

0

精彩评论

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