How to disable the selection in TableView iOS swift?
Solution:
If you want to disable the selection for entire tableView then use the below code for that.
If you want to disable the selection for entire tableView then use the below code for that.
tableView.allowsSelection = NO;
Or you can use the below code
cell.selectionStyle = UITableViewCellSelectionStyle.None
If you want to disable the selection for particular row you can do that in cell for row function disable the userinteraction for the cell.
Cell.UserInteractionEnabled = false
Comments
Post a Comment