iphone - 如何创建具有透明背景的 UITableViewCell

标签 iphone cocoa-touch uitableview

我正在尝试将 UITableViewCell 的背景颜色设置为透明。但似乎没有任何作用。我在 tableViewCell 中有一些图像/按钮,我想让白色的 grouptableview 背景消失,以获得图像和按钮的“ float ”效果(就像它们一样)不在 tableview 内)。

知道如何实现这一点吗?

最佳答案

如果其他选项都不起作用,请尝试此

UIView *backView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
backView.backgroundColor = [UIColor clearColor];
cell.backgroundView = backView;

关于iphone - 如何创建具有透明背景的 UITableViewCell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1008246/

相关文章:

iphone - 协议(protocol)中的协议(protocol)是否可以被视为包含它们采用的协议(protocol)?

iphone - 我想在 block 执行后返回值

iphone - 滚动范围可见 : How to scroll to the beginning of an UITextView

iphone - iOS 开发—— View 如何动态反射(reflect)应用内设置

ios - 根据选择和默认状态设置按钮图像

ios - 在 Swift 中刷新 NSFetchedResultController

ios - 通过在它们上方移动另一个 UIView 来影响所有 UIView

python - 从 Python 代码发送 Apple 的推送通知

ios - 如何从所有文本字段获取所有值

swift - uicelltableView 上的 uibutton 在 ios 9 上未单击,但在 ios 11 上可单击