这是我的应用程序的图像
如您所见,每一行都有白线。我怎样才能摆脱那条线。
这是我完成的单元格代码
cell.backgroundView = [ [[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"conta.png"] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0] ]autorelease];
cell.textLabel.backgroundColor=[UIColor clearColor];
cell.textLabel.text = [tableArray objectAtIndex:indexPath.row];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
tableView.backgroundColor=[UIColor clearColor];
return cell;
我需要擦掉每一行的白线。我怎样才能做到这一点?
最佳答案
在设置表格 View 期间的某处,您可以将分隔符样式设置为“无”。这可以在界面构建器 Storyboard/ Nib 中完成,也可以在代码中完成,例如:
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
关于iphone - UITableViewCell 去除每行之间的白色并显示 UIView 的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11349187/