2011-08-03 20 views

答えて

1
cell.contentView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.25]; 

を設定し、選択したとき、あなたは、セルの色を変更することができます。

1

で おかげで、

UITableViewCellbackgroundViewselectedBackgroundViewプロパティを設定します。

必要な背景色で新しいUIViewオブジェクトを作成し、プロパティにそのビューを割り当てます。

UIView *normalView = [[UIView alloc] initWithFrame:cell.bounds]; 
normalView.backgroundColor = [UIColor blueColor]; 
cell.backgroundView = normalView; 
[normalView release]; 

selectedBackgroundViewについても同様である。

が続いて最終的に、赤、緑、青の値を変更することにより

[cell.textLabel setBackgroundColor:[UIColor clearColor]]; 
+0

私の答えはあなたの問題を解決しましたか? – Ilanchezhian

関連する問題