Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • How can I set this height value dynamically to the height of my three rows? How do I calculate this height? Commented Oct 10, 2012 at 14:36
  • if you want to set the height for the rows then the method you are looking for is: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath Using your indexPath.row, you can return any height that you want! Commented Oct 10, 2012 at 14:40
  • This doesn't help me set the height of the table. How can I calculate the height that the table view should have based on the height of my three rows? Commented Oct 10, 2012 at 14:49
  • why don't you set its height from the XIB file. Don't you think that would be easy for you to reduce the height from there. Default height of row is 44 so just put it 132 or something or is there something that either of us is missing in the details. Commented Oct 10, 2012 at 14:53
  • Yes, I could set an intial height of 132, but when a row is clicked, the cell will expand to show more views. I don't know the height of these views. So I need a way to get the new height of the cell after it expands and update the table height appropriately Commented Oct 10, 2012 at 14:57