I send the user over to a page on a button click. This page is a UITableViewController.
Now if the user taps on a cell, I would like to push him ba
Swift 3, Swift 4
if movetoroot { navigationController?.popToRootViewController(animated: true) } else { navigationController?.popViewController(animated: true) }
navigationController is optional because there might not be one.