JASidePanels: How to navigate to different center

2019-08-22 00:08发布

问题:

I'm trying to integrate JASidePanels into my iOS application so that i can get the side swipe menu.

I have been successful in creating the Left, Right and the center view controllers and even able to view and hide the left & right menus.

And I'm struck here. I have added a UITableView in the left view controller so that I can display a menu. And when I click on a menu item from the left, its corresponding UIViewController should be displayed in the center and the menu should be hidden.

In the LeftViewMenu.m, in the didDeselectRowAtIndexPath method, I have added the following code:

switch([indexPath row]){
        case 0:
        {
            SecondUIViewController *secondView = [[SecondUIViewController alloc]initWithNibName:@"SecondUIViewController" bundle:nil];
            self.sidePanelController.centerPanel = secondView;
            [[self sidePanelController] toggleLeftPanel:nil];
            break;
        }

But it is not working at all. When i select the top cell in the menu, the SecondUIViewController is not being displayed.

I will be glad if you guys can tell me where I'm going wrong.