如何创建一个具有透明背景的UITableViewCell [英] How to create a UITableViewCell with a transparent background
本文介绍了如何创建一个具有透明背景的UITableViewCell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将 UITableViewCell
的背景颜色设置为透明。但没有什么似乎工作。我在 tableViewCell
里面有一些图像/按钮,我想让白色 grouptableview
背景消失,浮动效果的图像和按钮(好像他们不在 tableview
)。
I'm trying to set the background color of a UITableViewCell
to transparent. But nothing seems to work. I have some images/buttons inside the tableViewCell
and I would like to make the white grouptableview
background disappear to get a 'floating' effect for the images and buttons (as if they were not inside the tableview
).
推荐答案
如果其他选项都无效,请尝试此
If both the other options didn't work try this
UIView *backView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
backView.backgroundColor = [UIColor clearColor];
cell.backgroundView = backView;
这篇关于如何创建一个具有透明背景的UITableViewCell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文