iphone - 分组 UITableView 中的透明背景 - iPhone

标签 iphone uitableview background transparency

我想让分组的 UITableView 透明。我通过以下代码部分成功:

UIColor *bgColor = [[UIColor alloc] initWithWhite:1 alpha:0.0];
historyTable.backgroundColor = bgColor;

不幸的是,圆形单元格中出现了黑角。如何摆脱它们?

Before After

最佳答案

而不是使用

UIColor *bgColor = [[UIColor alloc] initWithWhite:1 alpha:0.0];
historyTable.backgroundColor = bgColor;

只需使用:

historyTable.backgroundColor = [UIColor clearColor];

这也清除了您所创建的内存泄漏。

关于iphone - 分组 UITableView 中的透明背景 - iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2396250/

相关文章:

iphone - 作为本地化字符串的字符串常量

iphone - iOS 上的自定义手势。 iPad

iphone - SQLite像查询多行

ios - 使用 UISearchController 搜索 TableView

android - 设置textView的边框和背景颜色

iphone - UIScrollView 中 UITableView 的内容大小问题

ios - 当它是一个单独的 Swift 文件时,从 TableViewDataSource 中删除或添加单元格

swift - 如何在 tableView 单元格之间添加空间?

移动浏览器上背景图片的CSS问题

background - 如何更改 aptana studio 的背景颜色?