title: TabBar - Navigate Back to the Rootlevel
body: <p>Setup looks like this:</p>
  
  <pre><code>LoginView MvxViewController
     MainView MvxTabBarViewController
        -Tab 1 
           - View1 (MvxViewController)
        -Tab 2 
           - View1 (MvxViewController)
        -Tab 3 
           - View1 (MvxViewController)
  </code></pre>
  
  <p>On View1 a I have a Tableview (List), will be filled always differently - depends on the tab.</p>
  
  <p>Everything works fine so far. The problem I face now is, that when I'm in View1 and press the "Back" Button on the NavigationController I will get back to the "LoginView" instead the "MainView" (Rootview where the tabs are).</p>
  
  <p>I found following command <code>this.NavigationController.PopToRootViewController(true);</code> but I didn't find the right place to use it. (If it's even the right way)</p>
  
  <p>I used this project to get the idea behind <a href="https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CirriousConference/Cirrious.Conference.UI.Touch/Views/TabBarController.cs" rel="nofollow">https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CirriousConference/Cirrious.Conference.UI.Touch/Views/TabBarController.cs</a></p>
  
  <p>Any help appreciated!</p>
  
  <p>EDIT:</p>
  
  <p>I solved the problem now, by removing following code (commented section removed):</p>
  
  <pre><code>public class MyPresenter : MvxModalSupportTouchViewPresenter, ITabBarPresenterHost
  {
      public MyPresenter(UIApplicationDelegate applicationDelegate, UIWindow window)
          : base(applicationDelegate, window)
      {
      }
  
      protected override UINavigationController CreateNavigationController(UIViewController viewController)
      {
          var toReturn = base.CreateNavigationController(viewController);
          toReturn.NavigationBarHidden = false;
          return toReturn;
      }
  
      public ITabBarPresenter TabBarPresenter { get; set; }
  
      public override void Show(IMvxTouchView view)
      {
          //if (TabBarPresenter != null &amp;&amp; view != TabBarPresenter)
          //{
          //    TabBarPresenter.ShowView(view);
          //    return;
          //}
          base.Show(view);
      }
  }
  </code></pre>
  
  <p>I still don't understand the purpose of this code as it's making troubles. By removing it, everything works fine. (Code was from the example, to find here: <a href="https://github.com/slodge/MvvmCross-Tutorials/blob/0f313e3be66b06c110f587b653b9b0c831fb7164/Sample%20-%20CirriousConference/Cirrious.Conference.UI.Touch/ConferencePresenter.cs" rel="nofollow">https://github.com/slodge/MvvmCross-Tutorials/blob/0f313e3be66b06c110f587b653b9b0c831fb7164/Sample%20-%20CirriousConference/Cirrious.Conference.UI.Touch/ConferencePresenter.cs</a>)</p>