mikefrederick / MFSideMenu

Facebook-like side menu for iOS
Other
1.17k stars 291 forks source link

navigate inside menu #87

Closed dhanu closed 11 years ago

dhanu commented 11 years ago

my requirement is change right side menu controller when clicking right side menu item. that means i need to navigate inside right sidebar. right sidebar should be open. center view controller should be same as before. can you please help me to do this?

mikefrederick commented 11 years ago

Have you tried using a UINavigationController as your right menu controller? I have never tried to do that but I would be interested to hear how it works.

Francescu commented 11 years ago

As the right sidebar is a regular viewController you should be able to navigate inside it in many ways

then when you want to push a new view controller : [((UINavigationController *)container.rightViewController) pushViewController:newViewController animated:YES];

What is the solution you tried ? Does it work ?

As I'm writing and watching the code solution 3 may cause trouble as the offset of the new rightViewController is not updated (cf Pull Request & Issue #88 ).

EDIT : setRightSideMenuFrameToClosedPosition seems to update the x origin of the new rightViewController.

dhanu commented 11 years ago

yeah i have tried UINavigationController as right menu controller, but it doesn't work.

i tried like the following... InstructionsViewController instructionsViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"InstructionsViewController"]; UINavigationController navigationController = self.menuContainerViewController.rightMenuViewController; NSArray *controllers = [NSArray arrayWithObject:instructionsViewController]; navigationController.viewControllers = controllers;

then finally i have updated right menu controller input elements.. this works fine. it look like it is navigating to another one.

mikefrederick commented 11 years ago

Sounds like you figured this out so I am going to close this issue.