I have a `UITableView` that has 100 cells. I want to create an array that will hold index values of that table that I want to disable the table cells if the table row selected matches any of the values in the array.

I have found that the following code works to disable a specific cell that I give it.

```
UITableViewCellSelectionStyle.none

```

Any help on this would be greatly appreciated.

This is how I am checking which cell is selected:

```
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

            let selectedRow = tableView.indexPathForSelectedRow?.row
            let workoutSelected = selectedRow
            stringPassedTableView = workoutSelected!

            let myVC = storyboard?.instantiateViewController(withIdentifier: "showWorkout") as! WorkoutViewController
            myVC.stringPassed = stringPassedTableView
            navigationController?.pushViewController(myVC, animated: true)

    }

```