我已成功更改我的UIButton
的颜色使用 alpha,但是当我尝试对我的 tableview 执行相同操作时,它不起作用。
_tablemenu.layer.borderWidth = 2;
_tableview.layer.borderWidth = 5;
_tableview.layer.borderColor = [UIColor colorWithRed:0xCC green:0xFF blue:0x99 alpha:0.5].CGColor;
_tablemenu.layer.borderColor = [UIColor greenColor].CGColor;
_tablemenu 的代码运行良好,但是当我尝试初始化
UIColor
时对于 RGB 值,它不起作用。
最佳答案
您必须在 R、G 和 B 中给出 0 到 1 之间的值
_tableview.layer.borderColor=[UIColor colorWithRed:204/255.0 green:255/255.0 blue:153/255.0 alpha:0.5].CGColor;
关于ios - 如何透明化表格 View 的边框颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35747520/