Is there a possibility to set a dynamic backgroundColor with static cells in a UITableView?

For example the user pressed a button in a UITableView and then all cells in the same view change to a specific color.

I already figured out how to set a backgroundColor when the view shows up:

```
override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
    cell.backgroundColor = UIColor.black
}

```

Now I want to achieve the same when the view has already loaded. Any suggestions?