0

UIView我在UITableCell调用时cellForRowAtIndexPath添加了一个附件视图。

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

但是当用户选择索引路径处的行时,附件视图不会突出显示。我试图避免将背景颜色设置为clearColor但没有任何区别。获得此图像中显示的以下效果:

在此处输入图像描述

4

1 回答 1

0

尝试使用这个

cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"flechalinterna.png"] highlightedImage:[UIImage imageNamed:@"flechalinterna.png"]];
于 2013-05-22T10:40:15.897 回答