【发布时间】:2011-11-01 03:05:29
【问题描述】:
有没有办法为单元格设置 selected 背景颜色?目前我正在使用此代码:
UIImageView* selectedBackgroundCell = [[[UIImageView alloc] initWithFrame:CGRectNull] autorelease];
[selectedBackgroundCell setImage:[UIImage imageNamed:@"cell_hover_bg.png"]];
[cell setSelectedBackgroundView:selectedBackgroundCell];
[cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"cell_bg.png"]]];
结果如下:
不幸的是,正如我所料,在所选模式下边框绘制得不好。 你知道如何解决这个问题吗?
【问题讨论】:
-
不是重复的。我设法添加了背景颜色,但没有添加选定的背景颜色。谢谢
标签: iphone ios uitableview background-color