Reputation: 77
Could anyone help me with changing the selected cell background colour in a static table? I have a static table as a form, with a white background, when tapping in the cell to edit the text field, the cell i have selected goes grey. Is there a way to change this to white?
I know how to do this in dynamically generated tables, but not static. Any help would be appreciated!
Upvotes: 1
Views: 512
Reputation: 81
Even if it's static tableview you can implement the
override func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
return false
}
This will stop the selected static tableview cell from highlighting.
Or if you want to do it in storyboard you can change the selection attribute in attribute inspector of each cell to none.
Upvotes: 1