Infamous911
Infamous911

Reputation: 1531

iOS - Get rid of UITableViewCell selection background color change

When I select a cell in my table, it highlights it in gray. I don't want it to highlight it at all. However, it still needs to be selectable in general because it contains buttons.

If I try to set the selectedBackgroundView of the cell (or set the backgroundColor of the cell when selected), this will obscure the cell separator.

Upvotes: 1

Views: 1536

Answers (2)

Ryan
Ryan

Reputation: 21

In Interface Builder, you can set your table view to have Single Selection, while your cells can have the .None selection style, as Vladimir states.

Upvotes: 2

Vladimir
Vladimir

Reputation: 170829

Try to set cell's selectionStyle property to .None - this property controls the color cell changes to when highlighted or selected.

Upvotes: 7

Related Questions