2013-05-22 43 views
0

当我调用cellForRowAtIndexPath时,我已在我的UITableCell中添加了accessoryView UIView配件查看图像在选择行时未突出显示

cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"flechalinterna.png"]]; 
cell.accessoryView.backgroundColor=[UIColor clearColor]; 

但是,当用户在索引路径上选择行时,附件视图不会高亮显示。我试图避免它将背景颜色设置为clearColor,但它没有任何区别。得到这个图片中显示的以下效果:

enter image description here

+4

贵'flechalinterna.png'具有透明背景? – graver

+0

我认为你是对的,会使我的图像透明,并会再次检查。谢谢 – civiac

+1

@graver它当然有效。非常感谢你。 – civiac

回答

0

尝试使用这一

cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"flechalinterna.png"] highlightedImage:[UIImage imageNamed:@"flechalinterna.png"]]; 
+0

它没有区别,我认为@graver是对的透明背景。将改变我的.png图像 – civiac

+0

是的,这是原因。 –