如何从UITableView单元行中删除单独的行。 我尝试了它,但仍然在UITableViewCell行中绘制了单独的一行。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.selectionStyle = UITableViewCellSeparatorStyleNone;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.backgroundColor = [UIColor colorWithRed:217.0/255.0 green:235.0/255.0 blue:244.0/255.0 alpha:1.0];
cell.textLabel.text = LOREM;
[cell.textLabel setFont:[UIFont fontWithName:@"GillSans" size:12.0]];
cell.textLabel.numberOfLines = 0;
return cell;
}
http://stackoverflow.com/questions/8561774/hide-separator-line-on-one-uitableviewcell –
的可能的复制你为什么要在每个设置TableView中财产细胞创造? –