How to get a UITableView row height to auto-size to the size of the UITableViewCell?
So assuming I\'m creating the UITableViewCell in Interface Builder, and it hei
self.tableView.estimatedRowHeight = 65.0; // Estimate the height you want
self.tableView.rowHeight = UITableViewAutomaticDimension; // auto change heights for multiple lines cells.
When implement UITableViewDataSource required method:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
cell.textLabel.text = [self.todoArray objectAtIndex:indexPath.row];
cell.textLabel.numberOfLines = 0; // allow multiple lines showing up
return cell;
}