0
import SideMenu
import UIKit

class SideMenuViewController: UITableViewController {

      //...

    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        self.tabBarController?.selectedIndex = indexPath.row
        self.dismiss(animated: true)
    }
}
burnsi
  • 6,194
  • 13
  • 17
  • 27

1 Answers1

0

have a look here...

let appDelegate = UIApplication.shared.delegate as! AppDelegate

if let tabBarController = appDelegate.window!.rootViewController as? UITabBarController {
    tabBarController.selectedIndex = indexPath.row
}
Shabnam Siddiqui
  • 579
  • 4
  • 13