0
我有一个自定义的UITableViewCell,里面有UITextView。随着用户输入文本,单元格随uitableview一起增长。 当我显示表,我要计算根据用户输入的文字内容自定义单元格的高度,所以在显示自定义的uitableviewcell内容的问题
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath[/CODE]
我用:
CGSize textSize = [myString sizeWithFont:[UIFont systemFontOfSize:17.0f] constrainedToSize:CGSizeMake(320, CGFLOAT_MAX) lineBreakMode:UILineBreakModeWordWrap];
return textSize.height;
返回的高度似乎是正确的,但不可见的文本被截断。