我知道它可能是重复的,但我想知道在选择单元格时更改蓝色突出显示颜色的最佳和最快方法。
当然,我已经尝试过(并且有效)包含选择单元格时更改背景颜色(像这样 thread )但我不喜欢这种方式, 我宁愿真正改变这个高亮颜色。
任何链接或想法?谢谢。
最佳答案
在tableview里面
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
创建一个 uiimageview 并将其背景颜色更改为您想要的颜色
if (cell == nil) {
UIImageView *bgView = [[UIImageView alloc]initWithFrame:cell.frame];
bgView.backgroundColor = [UIColor greenColor];
cell.selectedBackgroundView = bgView;
}
关于ios - 选择单元格时如何更改蓝色突出显示颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16687120/