How to change the blue highlight color of a UITableViewCell?

Thomas Joos picture Thomas Joos · Mar 31, 2010 · Viewed 122.7k times · Source

I'm wondering how to change the blue highlight/selection color of a UITableViewCell, any ideas?

Answer

zonble picture zonble · Mar 31, 2010

You can change the highlight color in several ways.

  1. Change the selectionStyle property of your cell. If you change it to UITableViewCellSelectionStyleGray, it will be gray.

  2. Change the selectedBackgroundView property. Actually what creates the blue gradient is a view. You can create a view and draw what ever you like, and use the view as the background of your table view cells.