I want to return to my previous viewController, so I used the dismiss method, but when I select a cell nothing happens. This is the code that I have right now.
override func tableView(_ tableView: UITableView, didSelectRowAtindexPath: IndexPath) {
delegate?.dataReceived(data: universityArray[indexPath.row].name)
dismiss(animated: true, completion: nil)
}
Form the top of my head, i can see two potential problems here
tableView
delegate is not settableView.delegate = self
popViewController
instead of dismiss
self.navigationController?.popViewController(animated: true)
Hope the problem was one of the above.