如何删除UITableViewCell的白色背景

rkb*_*rkb 5 iphone

我想删除UITableViewCell的默认白色背景,就像我希望单元格的背景是透明的,以便它显示窗口的实际背景.

rkb*_*rkb 7

我知道了.

UIView *backView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
backView.backgroundColor = [UIColor clearColor];
cell.backgroundView = backView;
Run Code Online (Sandbox Code Playgroud)