分组 UITableView 中的透明背景 - iPhone [英] Transparent background in grouped UITableView - iPhone
本文介绍了分组 UITableView 中的透明背景 - iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想让分组的 UITableView 透明.我部分成功了以下代码:
I want to make the grouped UITableView transparent. I partially succeded with the following code:
UIColor *bgColor = [[UIColor alloc] initWithWhite:1 alpha:0.0];
historyTable.backgroundColor = bgColor;
不幸的是,圆形单元格中出现了黑角.如何摆脱它们?
Unfortunately, black corners appeared in the rounded cells. How to get rid of them?
推荐答案
代替使用
UIColor *bgColor = [[UIColor alloc] initWithWhite:1 alpha:0.0];
historyTable.backgroundColor = bgColor;
只需使用:
historyTable.backgroundColor = [UIColor clearColor];
这也清除了您创建的内存泄漏.
That also clears up the memory leak you were creating.
这篇关于分组 UITableView 中的透明背景 - iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文