Need to change the color of table view selection

Viewed 23980

I need to change the default blue color selection of table view to some custom color. Is there any way to do that. Help me

5 Answers

Make sure that after you declare in the header

@property(nonatomic) UITableViewCellSelectionStyle selectionStyle

Implement

cell.selectionStyle = UITableViewCellSelectionStyleGray

where UITableViewCellSelectionStyleGray can be UITableViewCellSelectionStyleNone, UITableViewCellSelectionStyleBlue, UITableViewCellSelectionStyleGray.

Related