我正在尝试使表格单元格完全透明。我在iOS 5中使用静态表格单元格,并尝试更改以清除颜色,但它确实做到了
我甚至尝试过(在viewDidLoad中)
self.tableView.backgroundColor = [UIColor clearColor];
但是整个桌子是黑色的,单元格是白色的。(见图)
发布于 2012-07-11 14:59:17
self.tableView.backgroundColor = [UIColor clearColor]
-将更改表格视图的背景颜色,而不是单元格。
尝试在界面生成器中选择各个单元格,然后使用检查器将单元格背景更改为某种颜色或不更改为透明。
发布于 2012-12-27 14:34:53
尝尝这个
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath {
cell.backgroundColor = [UIColor clearColor];
}
发布于 2012-07-11 15:02:03
在cellForRowAtIndexPath中尝试[cell setOpaque:FALSE]
和[单元格设置背景颜色: in颜色clearColor]:
https://stackoverflow.com/questions/11435316
复制相似问题