Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ios

iphone

ipad

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!

like image 703
BeachRunnerFred Avatar asked Sep 04 '10 23:09

BeachRunnerFred


1 Answers

You can do so either with the

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

UITableViewDelegate method or the rowHeight property of UITableView.

like image 179
Alexsander Akers Avatar answered Sep 25 '22 20:09

Alexsander Akers