title: RESideMenu and Navigation
body: <p>I'm using this for a side menu in my app: <a href="https://github.com/romaonthego/RESideMenu" rel="nofollow">https://github.com/romaonthego/RESideMenu</a></p>
  
  <p>I'm having some issues to implement it in my own way. The samples work fine, but I have problem to make it work over my app navigation.</p>
  
  <p>I would like to have access to this menu over my whole application. I'll show you how I integrate it.</p>
  
  <p>Here is my HomeViewController <code>viewDidLoad</code> which is also my rootViewController</p>
  
  <pre><code>UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self];
  
  LeftSideMenuViewController *leftMenuViewController = [[LeftSideMenuViewController alloc] init];
  
  RESideMenu *sideMenuViewController = [[RESideMenu alloc] initWithContentViewController:navigationController
                                                                  leftMenuViewController:leftMenuViewController
                                                                 rightMenuViewController:nil];
  
  
  [[self navigationController] setNavigationBarHidden:YES animated:NO];
  
  sideMenuViewController.delegate = self;
  
  [[UIApplication sharedApplication] delegate].window.rootViewController = sideMenuViewController;
  </code></pre>
  
  <p>From this controller I perform a <code>show segue</code> to navigate to the next ViewController which works like a <code>UITabViewController</code>, cf. : <a href="https://github.com/robbdimitrov/RDVTabBarController" rel="nofollow">https://github.com/robbdimitrov/RDVTabBarController</a></p>
  
  <pre><code>- (void)viewDidLoad {
  self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"side_menu_left_not_focused_icon"]
                               style:UIBarButtonItemStylePlain target:self action:@selector(presentLeftMenuViewController:)];
  
  
  UIViewController *sessionViewController = [[SessionTableViewController alloc] init];
  
  UIViewController *firstNavigationController = [[UINavigationController alloc]
                                                 initWithRootViewController:sessionViewController];
  
  UIViewController *searchViewController = [[SearchViewController alloc] init];
  
  UIViewController *secondNavigationController = [[UINavigationController alloc]
                                                 initWithRootViewController:searchViewController];
  
  [self setViewControllers:@[firstNavigationController, secondNavigationController]];
  }
  </code></pre>
  
  <p>And finally here is my <code>LeftSideMenuViewController</code> where I want to perform my action:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
  [tableView deselectRowAtIndexPath:indexPath animated:YES];
  switch (indexPath.row) {
      case 0:
          /*Here is where I want to pop to my HomeViewController*/
          [self.sideMenuViewController hideMenuViewController];
          break;
      case 1:
          break;
      default:
          break;
  }
  }
  </code></pre>
  
  <p>In the project sample they perform this action :</p>
  
  <pre><code>[self.sideMenuViewController setContentViewController:[[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]
                                                       animated:YES];
  </code></pre>
  
  <p>I just want to get back to my <code>HomeViewController</code> by popping the current one. But obviously <code>popToRootViewControllerAnimated:</code> does not have any effect.</p>