iOS tableview 选中Cell后的背景颜色和文字颜色

做下记录,备忘

改文字颜色其实是UILabel的属性,改背景颜色是cell的属性,都和tableview无关。

 cell.textLabel.textColor = BAR_COLOR;
 cell.textLabel.highlightedTextColor = [UIColor whiteColor];

    
    
 UIView *selectedView = [[UIView alloc] init];
 selectedView.backgroundColor = BAR_COLOR;
 cell.selectedBackgroundView = selectedView;
原文地址:https://www.cnblogs.com/breezemist/p/3529820.html