透明的背景分组的UITableView - iPhone [英] Transparent background in grouped UITableView - iPhone

查看:134
本文介绍了透明的背景分组的UITableView - iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打分组的UITableView透明。我部分用下面的code succeded:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆