Closed dhanu closed 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.
As the right sidebar is a regular viewController you should be able to navigate inside it in many ways
[container.rightViewController.view addSubview:myNewView];
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
init your containerViewController :
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
container = [MFSideMenuContainerViewController containerWithCenterViewController:x leftMenuViewController:y rightMenuViewController:navigationController];
then when you want to push a new view controller :
[((UINavigationController *)container.rightViewController) pushViewController:newViewController animated:YES];
[container setRightViewController:newViewController];
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.
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.
Sounds like you figured this out so I am going to close this issue.
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?