0

I have a SideMenu and the 2nd item is back to the prev VC but it's not working. Someone help me pls how can i go back? :)

class MainViewController: UIViewController  {
...
}



private class HamburgerMenuListController: UITableViewController {

override func tableView(_ tableView: UITableView,
                            didSelectRowAt indexPath: IndexPath) {
    tableView.deselectRow(at: indexPath, animated: true)
    switch(indexPath.row) {
        case 0:
            ...
            break
        case 1:
            dismiss(animated: true, completion: nil)
            navigationController?.popViewController(animated:true) //it's not working
            break
        }
    }
}
timea
  • 1

0 Answers0