Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make cells in UITableView not turn blue?

Tags:

People also ask

How do I change the color of a cell in Swift?

Basic Swift Code for iOS Apps For changing the background color of the table view cell, you should change the contentView. backgroundColor property of the cell. Now run the project to see the effect.

How do I change the background color of a selected cell in Swift?

Swift 3, 4, 5 select cell background colour Show activity on this post. Next connect your cell's selectedBackgroundView Outlet to this view. You can even connect multiple cells' outlets to this one view. Save this answer.

How do you make a tableView cell Unselectable?

To completely prevent selection of the UITableViewCell , have your UITableViewDelegate implement tableView:willSelectRowAtIndexPath: . From that method you can return nil if you do not want the row to be selected. This prevents the row from being selected and tableView:didSelectRowAtIndexPath: from being called.


I am using a UITableView and the cells I am using in this view should do nothing when I click them. I can't turn off UserInteraction though because then I am not able to click on the accessory (detailDisclosureButton). So how can I make them stop turning blue and still allow them to click on the accessory?