1. System default color settings
- Colorless
- Cell.selectionstyle = Uitableviewcellselectionstylenone;
- Blue
- Cell.selectionstyle = Uitableviewcellselectionstyleblue;
- Grey
- Cell.selectionstyle = Uitableviewcellselectionstylegray;
2. Custom color and background settings
Change UITableViewCell background color When selected:
- Uicolor *color = [[Uicoloralloc]initwithred:0.0green:0.0blue:0.0alpha:1]; //Use RGB to define your own colors
- Cell.selectedbackgroundview = [[[UIView alloc] initWithFrame:cell.frame] autorelease];
- Cell.selectedBackgroundView.backgroundColor = [Uicolor xxxxxx];
3. Custom UITableViewCell Background When selected
- Cell.selectedbackgroundview = [[[Uiimageview alloc] initwithimage:[uiimage imagenamed:@"Cellart.png"] Autorelease];
- and a font color.
- Cell.textLabel.highlightedTextColor = [Uicolor Xxxcolor]; [Cell.textlabel Settextcolor:color]
4. Set the color of the split line between Tableviewcell
- [THETABLEVIEW SETSEPARATORCOLOR:[UICOLOR XXXX ]];