【发布时间】:2012-02-17 04:22:17
【问题描述】:
如何更改uitableview单元格背景图片?
我写了这段代码,它不起作用。但我确信这段代码有些小错误。
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundView:[UIImage imageNamed:@"selected-bg.png"]];
}
【问题讨论】:
标签: iphone objective-c