如我所见,您在CellForrowatIndExpath中犯了2个错误,该错误未检查单元格是否为null创建一个错误并根据收件人列表设置单元格。
您应该喜欢以下:
NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
PFUser *user = [self getUserAtIndexPath:indexPath];
cell.textLabel.text = user.name;
if ([self.recipients containObject:user]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
return cell;