I have read the guidelines for contributing and I understand:
How do I change the center view controller depending on cell selection from side menu?
In the documentation I couldn't find any solution for this problem, I see always one controller persists in the center, and I'm not able to replace it with another controller (when another cell clicked from side menu table)
It's covered in the README.
I don't see where this is covered in the README without a storyboard implementation ?
Please read carefully.
https://github.com/jonkykong/SideMenu#code-implementation
Don't really get it. When You push on menuLeftNavigationController it changes the center viewController?
Please read up on the fundamentals of pushing/popping/presenting view controllers. There's no special code to write, just do what you would normally do.
@stefgeelen got anything?
Very poorly written controller options.
@shivali-triffort if you can't be constructive, please write your own code or use a different repository.
What you're asking for is not something not specific to SideMenu. It is general coding you have to figure out how to write on your own, the same way you would if you were not using SideMenu at all:
There are other ways you can solve it, but that one is top of mind.
Is someone understand this answer?
How I understood this:
You have CenterViewController which create and can open MenuViewController. Something like this
let menuLeftNavigationController = UISideMenuNavigationController(rootViewController: menuController)
SideMenuManager.default.menuLeftNavigationController = menuLeftNavigationController`
After that you can open menu like this
present(SideMenuManager.default.menuLeftNavigationController!, animated: true, completion: nil)
But if you want to change CenterViewController to an other one you create CenterViewControllerDelegate which implements method like this:
func openAccountScreen() {
if let controller = AccountViewController.storyboardInstance() {
navigationController?.pushViewController(controller, animated:true)
}
}
Before use MenuViewController you do this
menuController.delegate = self where self your current CenterViewController
And after choose item Account in MenuViewController you need to do this:
delegate?.openAccountScreen()
If I am right this construction is not work! And it's awful! Because I want to have result like example.
It's work something like I need when I disable animation in pushViewController. May be It'll help someone. But if you need to have your own NavController in your new CenterViewController you'll have a problem as I see it.
Is someone have an other solution for this problem? Thank you in advance!
Most helpful comment
Very poorly written controller options.