I have a table view controller (A) which modally presents a navigation controller with another table view controller (B) as its root view. B is presented when a cell is tapped from A, but the cell remains selected when dismissing B by swiping it down.

I've been trying to access A from B without trying to use delegates because it seems excessive to set all that up just to deselect some rows for when a user decides to swipe down to dismiss B instead of use the cancel button which calls an unwind segue to deselect the rows.

I've tried deselecting rows in `viewWillAppear()` and `viewDidAppear()` in A, but that doesn't seem to work.

I've implemented the `presentationControllerDidDismiss(presentationController:)` function in B so I may call A to deselect rows when B is properly dismissed, but I'm having trouble accessing A.

I've tried manually adding and calling the same segue as the one the cancel button calls, to reuse the same deselect implementation

```
class TableViewControllerB: UITableViewController, UIAdaptivePresentationControllerDelegate {
    // ...

    func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
        self.performSegue(withIdentifier: "cancelUnwind", sender: self)
    }

}

```

and I've also tried accessing A through `presentingViewController`, but for some reason it's nil even though B was modally presented through A.

I'm not sure how else to access A or get it to deselect its rows when B is swipe dismissed. Any ideas would be greatly appreciated.