1.システムのデフォルトの色設定
1 // 无色 2 cell.selectionStyle = UITableViewCellSelectionStyleNone。 3 4 // 蓝色 5 cell.selectionStyle = UITableViewCellSelectionStyleBlue。 6 7 // 灰色 8 cell.selectionStyle = UITableViewCellSelectionStyleGray。
2.カスタムの色と背景の設定
1 UIColor *色= [[UIColoralloc] initWithRed:0 .0green:0 .0blue:0 .0alpha:1 ]; // RGBによって独自の色を定義する 2 cell.selectedBackgroundView = [[[UIViewのアロケーション] initWithFrame:細胞。フレーム】自動リリース]; 3 cell.selectedBackgroundView.backgroundColor = [UIColor XXXXXX]。
3.カスタムUITableViewCellの選択した背景
1 cell.selectedBackgroundView = [[[UIImageView ALLOC] initWithImage:[UIImage imageNamed:"@ cellart.png " ]]自動リリース]。 2 还有字体颜色 3 cell.textLabel.highlightedTextColor = [UIColor xxxcolor]。[cell.textLabel SETTEXTCOLOR:色]
転送します。https://blog.csdn.net/u011545929/article/details/14524147