You might want to calculate the height of the mark in a limited width. In this case, you can create a method like this:
- (CGFloat)textHeightOfMyLabelText { CGFloat textHeight = [self.myLabel.text sizeWithFont:self.myLabel.font constrainedToSize:LABEL_MAX_SIZE lineBreakMode:self.myLabel.lineBreakMode].height; return textHeight; }
and use the result in - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath . Remember to add the marker value of your label.
Ossir
source share