我希望我的表格 View 单元格具有彩色边框和圆角。那就是我试过的:
// Color
[cell.contentView.layer setBorderColor:[UIColor colorWithHexString:@"dbd7d7"].CGColor];
// Rounded corners
[cell.layer setCornerRadius:7.0f];
[cell.layer setMasksToBounds:YES];
[cell.layer setBorderWidth:2.0f];
cell.layer.borderColor = [UIColor colorWithHexString:@"dbd7d7"].CGColor;
但是,左右边框上有奇怪的“白色三角形”。请看一下:
如何解决?
最佳答案
确保表格 View 的背景颜色清晰并检查 cell.opaque = NO;
关于ios - 为 UITableViewCell 设置彩色边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34621570/