dogo / AKSideMenu

Beautiful iOS side menu library with parallax effect. Written in Swift
MIT License
281 stars 50 forks source link

Push view controller from leftMenuViewController? #56

Closed RNUK closed 3 years ago

RNUK commented 5 years ago
Include the following:
Reproduction Steps
  1. Setup as per example
  2. Create button in LeftMenuController to push content

Using code:

self.sideMenuViewController!.navigationController?.pushViewController(eventVC, animated: true)
self.sideMenuViewController!.hideMenuViewController()
Expected Result

Left menu hides and new view is pushed onto navigation stack

Actual Result

Left menu closes

Tell us what could be improved:

keshu1024 commented 5 years ago
self.sideMenuViewController!.setContentViewController(UINavigationController(rootViewController: YourViewController), animated: true)

self.sideMenuViewController!.hideMenuViewController()
usamaazam10 commented 4 years ago

@RNUK This is how I achieve this functionality

let vc = SomeViewController (UIApplication.shared.delegate as? AppDelegate)?.sideMenuViewController?.hideMenuViewController() (((UIApplication.shared.delegate as? AppDelegate)?.sideMenuViewController?.contentViewController) as? UINavigationController)?.pushViewController(vc, animated: true)