아미(아름다운미소)

SWRevealViewController의 SlideMenuViewController에서 TabBarController 열기 본문

랭귀지/SWIFT

SWRevealViewController의 SlideMenuViewController에서 TabBarController 열기

유키공 2018. 6. 6. 11:30

How to open a TabBarController in ViewControllers that Instantiate from SlideMenuViewController

class MenuViewController: UITableViewController {
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let tabIndex = indexPath.row
        let tabbarVC = (revealViewController().frontViewController as! UITabBarController)
        tabbarVC.selectedIndex = tabIndex
        revealViewController().revealToggle(animated: true) 
    }
}
Comments