1
所以在UITableViewCell
子这个伟大的工程:iOS5的变化蓝色小区选择自定义图像梯度没有子
- (void)awakeFromNib {
[super awakeFromNib];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"table-highlight.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]];
imageView.contentMode = UIViewContentModeScaleToFill;
self.selectedBackgroundView = imageView;
}
但是我只是用未子类标准表细胞的tableView。我试过各种各样的组合,如在其他答案中找到没有运气:
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"table-highlight.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]];
imageView.contentMode = UIViewContentModeScaleToFill;
cell.selectedBackgroundView = imageView;
}
一定要标记您的答案的答案,因此在搜寻结果中的回答。 –
我会的。必须等待2天。 –
大声笑说,鲍勃去年以前^^ – mafiOSo