MMDrawerController, which controls the central controller from sideviewcontrollers with customization of storyboards

I am using the MMDrawerController + Storyboard class in my application. Everything is configured correctly, and sidecontrollers are hidden and detected using methods that are launched from the centerview controller. I am having problems navigating a centralized controller from within the assembly mode controllers. Third-party controllers are tableview controllers, and I'm just trying to figure out how best to use navigation when a cell is selected from one of the side view controllers. Here is the code I'm working with:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self.mm_drawerController closeDrawerAnimated:YES completion:^(BOOL finished) { [self.mm_drawerController.centerViewController.navigationController popToRootViewControllerAnimated:YES]; }]; } 

Nothing seems to be happening. All I'm trying to do right now is simply reset the navigation stack in the top most of the viewcontroller after closing the side box, but it doesn't seem to work. Has anyone else had experience with similar settings and can help me point in the right direction? In the end, I want to be able to push different view controllers onto the navigation stack.

+4
source share
1 answer

It revealed:

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UINavigationController *nav = (UINavigationController *)self.mm_drawerController.centerViewController; [nav popToRootViewControllerAnimated:NO]; [self.mm_drawerController closeDrawerAnimated:YES completion:nil]; } 
+4
source

Source: https://habr.com/ru/post/1495367/


All Articles