How to change a cell’s selection colour

- by

By default, when you touch a cell in a UITableView, it lights up bright blue. You can use this property to change the cell’s selection style in the cellForRowAtIndexPath method:

cell.selectionStyle = UITableViewCellSelectionStyleGray;

Possible values are

  • UITableViewCellSelectionStyleGray
  • UITableViewCellSelectionStyleBlue (the default)
  • UITableViewCellSelectionStyleNone

Alternatively you can select the cell in Interface Builder and pick these values from the drop down menu:

Screen Shot 2013-01-11 at 01.05.19



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site witout any pesky ads! More details here.

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.