我想在一个单元格中绘制2个按钮,当按下按钮时,蓝色图像将覆盖单元格的一半。

但是我无法绘制1个像素。

情况如下:

和代码:

[self addGood12ToView:cell.contentView productDetail:productDetail];

在此函数中,我调用了:
UIButton *lbGood1 = [UIButton buttonWithType:UIButtonTypeCustom];
[lbGood1 setFrame:CGRectMake(0, 0, 150, lbGood1_Size.height+19)];
...
[cell.contentView addSubview:lbGood1];

最佳答案

对此进行检查可能对您有很大帮助。

self.yourTableView.separatorStyle=UITableViewCellSeparatorStyleNone;

关于iphone - 两个UITableViewCellStyleDefault单元格之间的一个像素-无法在其上绘制,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11392340/

10-10 20:30