title: Right side menu in a tab application with a login screen
body: <p>I am creating a simple tab bar application and have implemented the side nav using <code>MMDrawerController</code> <a href="https://github.com/mutualmobile/MMDrawerController" rel="nofollow noreferrer">https://github.com/mutualmobile/MMDrawerController</a></p>
  
  <p>I have imported the relevant files into my project and have been following this tutorial: <a href="https://www.youtube.com/watch?v=TdKnImb4SWs" rel="nofollow noreferrer">https://www.youtube.com/watch?v=TdKnImb4SWs</a></p>
  
  <p>It works correctly however the issue I am having is when I implement a user login screen (loginViewController) and despite setting it as my initial view controller, the intial view still defaults to the first tab. I understand this is because of a function set in my <code>AppDelegate</code> which is:</p>
  
  <pre><code>func buildNavigationDrawerInterface(){
  
      let mainStoryBoard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
      let mainPage : TabBarViewController = mainStoryBoard.instantiateViewController(withIdentifier: "MainTabBar") as! TabBarViewController
      let rightSideMenu : RightSideViewController = mainStoryBoard.instantiateViewController(withIdentifier: "RightSideViewController") as! RightSideViewController
      let rightSideMenuNav = UINavigationController(rootViewController: rightSideMenu)
  
      drawerContainer = MMDrawerController(center: mainPage, rightDrawerViewController: rightSideMenuNav)
      drawerContainer!.openDrawerGestureModeMask = MMOpenDrawerGestureMode.panningCenterView
      drawerContainer!.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.panningCenterView
  
      window?.rootViewController = drawerContainer
  }
  </code></pre>
  
  <p>I know (or at least think) that the last line is the reason the application starts at the tabs and not at login. When I remove this, the app starts at login however once in, the menu no longer works.</p>
  
  <p>So my question:</p>
  
  <p>Is there a way I can override the last line of the function so that the <code>loginViewController</code> is the intial view AND the menu functionality works? Or alternatively, is there another route I can take to implement what I am trying to do? I do not have to use <code>MMDrawerController</code></p>