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.

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

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift