Reputation: 17591
When I select a row of a table view, it becomes blue. I want the row to not change color when I touch it. How can I do this?
Upvotes: 3
Views: 1796
Reputation: 572
Under the cellforrowatindexpath, assign a variable to the 'cell' object
cell.selectionStyle = UITableViewCellSelectionStyleNone;
Upvotes: 0
Reputation: 28864
If you want to disallow selection of all rows in your table, then in the setup of your table's view controller (such as in viewDidLoad
), set
self.tableView.allowsSelection = NO;
Upvotes: 1
Reputation: 3443
each cell will need one of these:
cell.selectionStyle = UITableViewCellSelectionStyleNone;
Upvotes: 6