iosswiftside-menu

kukushi/SideMenu Reveal Menu not working from presented anotherViewController


I use side menu library "kukushi/SideMenu"

I send data to another tableViewController (ScheduleTableVC)

    let navigation = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "SchedulePage") as! UINavigationController
    let vc = navigation.viewControllers.first as! ScheduleTableVC
    vc.text = ""
    self.present(navigation, animated: true, completion: nil)

But in ScheduleTableVC library function

    self.sideMenuController?.revealMenu() 

not working, which must show menu


Solution

  • Solve it with this

        let navigation = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "SchedulePage") as! UINavigationController
        let vc = navigation.viewControllers.first as! ScheduleTableVC
        vc.text = ""
    
        sideMenuController?.setContentViewController(to: navigation, animated: false, completion: nil)