The user can make a comment which can be can be any size or height. The comment label's dynamic content should fit into the cell.
I have allocated my label inside UITableViewCell
with a key value.
cell.CommentLabel.text=[ResDiction objectForKey:@"Comment"];
cell.TimeLabel.text=[ResDiction objectForKey:@"CreateDate"];
cell.UserName.text=[ResDiction objectForKey:@"CreateUserName"];
cell.UserName.adjustsFontSizeToFitWidth=YES;
cell.CommentLabel.adjustsFontSizeToFitWidth=YES;
cell.CommentLabel.numberOfLines = 8;
cell.TimeLabel.adjustsFontSizeToFitWidth=YES;
How do I let the label's content determine the cell height?