0
私はテキストビューのカスタムUITableViewCell
を持っています。動的にtextViewに従ってUITableViewCell hightを増やすことができません
textViewの高さはテキストによって増加します。
テキストビューに合わせてセルの高さを上げる方法を理解できません。あなたは、この手順を実行する必要があり、そのために
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NotificationCell *cell = (NotificationCell *)[tableView dequeueReusableCellWithIdentifier:@"cell"];
if (cell == nil) {
NSArray *ary = [[NSBundle mainBundle]loadNibNamed:@"NotificationCell" owner:self options:nil];
cell = [ary objectAtIndex:0];
}
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithDictionary:[NotificationArray objectAtIndex:indexPath.section]];
cell.title_lbl.text=[dict objectForKey:@"event_title"];
cell.description_lbl.text=[dict objectForKey:@"description"];
[cell.description_lbl sizeToFit];
[cell sizeToFit];
return cell;
}
[UILabelテキストの量に応じてテーブルビューセルの高さを上げる]可能な複製(http://stackoverflow.com/questions/36544115/increase-height-of-tableview-cell-according-to-amount-of-ユーラベルテキスト) –