0

According to the following image, the output is a table view. In section 3 the height of each cell is 200. In each cell I have placed one label which has the same height as the cell height i.e. 200. After that I place one more label to display the text from XML which is in gray color. This text is dynamic. I want to resize the cell height according to the this text label because after that I want to place 6 more label to display more data. For your reference you can see in a different color. For that I write following code.

albertamg
  • 28,492
  • 6
  • 64
  • 71
Priyanka
  • 511
  • 8
  • 24

1 Answers1

3

For all rows:

[tableView setRowHeight:44];

For each row individually:

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
   //return appropriate value based on IndexPath.row
}
Mundi
  • 79,884
  • 17
  • 117
  • 140