删除圆角UITableViewCell

时间:2012-01-02 15:45:36

标签: ios uitableview

我一直试图这样做一段时间。我只是想删除你在这张照片上看到的圆角:

enter image description here

有谁知道怎么做?

[编辑1:细胞建筑]

我将UITableViewCell子类化为自己的布局。然后我在这些单元格中添加背景,如下所示:

UIImageView* imageView = [ [ UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320.0, 44.0)];
imageView.image = cellBackground;
cell.backgroundView = imageView;

2 个答案:

答案 0 :(得分:3)

我需要编辑相应单元格的背景视图。 E.g。

UIView *bg = [[UIView alloc] initWithFrame:cell.frame];
bg.backgroundColor = [UIColor whiteColor]; // or any color
cell.backgroundView = bg;
[bg release];

答案 1 :(得分:1)

默认情况下,角落不会四舍五入,只是你知道。

  • 您是否有制作角落的单元格的背景图像 似乎圆润(最有可能)?
  • 每个细胞实际上都是细胞的一部分 tableview和它们之间没有空间?
  • 你在测试吗? 越狱iPhone,你有一些冬季主题安装 改变了tableviews的风格?