hIdentifier:cellIdentifier];
5
6 if (!cell) {
7 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleva lue1 reuseIdentifier:cellIdentifier];
8 } else {
9 // 删除Cell的所有子视图
10 while ([cell.contentView.subviews lastObject] != nil) {
11 [(UIView*)[cell.contentView.subviews lastObject] removeFromSuperview];
12 }
13 }
14
15 // 说明: 要测试Cell内容是否错乱, 要将每行Cell显示的内容不同, 才能看出来
16 cell.textLabel.text = @"Cell显示内容";
17 cell.detailTextLabel.text = @"Cell辅助显示内容";
18
19 return cell;
20 }
(以上便是对相关知识的相关介绍和理解,还希望大家相互补充共同进步)
|