Reputation: 513
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.
Upvotes: 0
Views: 943
Reputation: 80273
For all rows:
[tableView setRowHeight:44];
For each row individually:
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
//return appropriate value based on IndexPath.row
}
Upvotes: 3