Change the UITableViewCell Height According to Amount of Text

Its simple, just add this to your code:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return UITableViewAutomaticDimension;
}

It automatically count an height of row and than return a float… 🙂

Hope this helps!

Leave a Comment