I'm using MMdrawerController
to practice side drawer controllers in my project. But when I tap on the menu button on the left side, then tap to the row that selected, it opens just fine, but the corresponding view doesn't show menu item (drawer menu button) on the left of the view. So I can't make any further selection.
And I use storyboard.
Sample code from MydrawerController
I navigate through cells in drawer's tableview.
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.delegate drawerMenuViewController:self didSelectMenuSection:indexPath.row];
switch ((MMDrawerMenuViewControllerSection)indexPath.row) {
case MMDrawerMenuViewControllerSectionProfile:
[self.mm_drawerController setCenterViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"MMProfileViewController"] withCloseAnimation:YES completion:nil];
break;
default:
break;
}
}
My center view is simply does these:
-(void)setupLeftMenuButton{
MMDrawerBarButtonItem *leftDrawerButton=[[MMDrawerBarButtonItem alloc]initWithTarget:self action:@selector(leftDrawerButtonPress:)];
[self.navigationItem setLeftBarButtonItem:leftDrawerButton animated:YES];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)leftDrawerButtonPress:(id)sender{
[self.mm_drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil];
}
-(void)doubleTap:(UITapGestureRecognizer*)gesture{
[self.mm_drawerController bouncePreviewForDrawerSide:MMDrawerSideLeft completion:nil];
}
And my other view controller that can't display menu item has the same button handlers given above. But still not showing the menu item.