I ve got a UIView that I m Plus to a cell s content view in a particular section ( Section 1 specified), as show below:
[cell.contentView addSubview:self.overallCommentViewContainer];
当我迅速上下台时,第0节中出现了“情报调查”意见,尽管我从未在第0节中向任何囚室添加“情报调查”意见。
详见我的<密码>ForRowAtIndexPath。 方法:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *kCustomCellID = @"CustomCellID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCustomCellID];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCustomCellID] autorelease];
}
// Configure the cell.
switch(indexPath.section) {
case 0:
// other code
break;
case 1:
// add the overall comment view container to the cell
NLog(@"adding the overallCommentViewContainer");
[cell.contentView addSubview:self.overallCommentViewContainer];
NLog(@"creating the row at: Section %d, Row %d", indexPath.section, indexPath.row);
break;
}
return cell;
}