【发布时间】:2013-04-05 08:17:35
【问题描述】:
我有我的 tableView。但我对 tableViewCell 中的图像有一些问题。背景颜色仅显示在左右角,但在我的 tableView 的所有背景中以中间颜色显示。当我更改表格中的背景颜色时,tableViewCell 中间的颜色也发生了变化...
我在 tableViewCell 中添加图像的代码: 什么时候推送...
cell.backgroundView = [[[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"noselected.png"]stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0] ]autorelease];
然后推。按下显示好的。
cell.selectedBackgroundView = [ [[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"yesselected.png"] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0] ]autorelease];
另外:我尝试了 UIColour cleareColor 但没有。
【问题讨论】:
-
发布您的 cellForRowAtIndexPath 方法代码。
-
谢谢,一切顺利!
标签: ios tableview tableviewcell