title: How to approach navigation for an iOS app with sub-areas/routes
body: <p>I'm new to objective-c/iOS development and am struggling to find guidance on how to structure navigation given an app menu structure such as:</p>
  
  <ul>
  <li><strong>Home</strong>
  
  <ul>
  <li>Start order</li>
  <li>Select store</li>
  <li>Select category</li>
  <li>Add item to basket</li>
  <li>Checkout etc.</li>
  </ul></li>
  <li><strong>My Account</strong>
  
  <ul>
  <li>Edit/Add addresses</li>
  <li>Update profile etc.</li>
  </ul></li>
  <li><strong>Order History</strong>
  
  <ul>
  <li>View Order</li>
  </ul></li>
  <li><strong>etc.</strong></li>
  </ul>
  
  <p>I'm using <a href="https://github.com/ECSlidingViewController/ECSlidingViewController" rel="nofollow">ECSlidingViewController</a> to display the navigation menu (i.e. the top level nav is hidden and not displayed ala tab bar controller).</p>
  
  <p>I'm from a web development background, so I'm used to individual views having a route (URL) and being able to load up any route from anywhere.</p>
  
  <p>I think I understand how to use UINavigationController (or at least I think I do) to handle sequential navigation such as (home > start order > select store etc.) where back (pop) makes sense, but I'm a little worried that I'm missing something with respect to unstructured navigation. </p>
  
  <p>For example, if I'm on the checkout view (a few controllers deep in the home navigation hierarchy), and I decide to tap menu (menu slides out) and select My Account, fiddle with my details, then tap menu and home, I would expect to land back where I was before I navigated to My Account (i.e. on the checkout page).</p>
  
  <p>What is the standard practice for this type of navigation? I was looking at libraries such as <a href="https://github.com/clayallsopp/routable-ios" rel="nofollow">routable-ios</a> but don't have enough experience to make a call as to whether this is a decent approach or not.</p>
  
  <hr>
  
  <p>I have considered the following approach:</p>
  
  <ol>
  <li>Maintain a high level UINavigationController which maintains an array of sub-UINavigationControllers, i.e. [HomeNavigationController, AccountNavigationController, OrderHistoryNavigationController]</li>
  <li>To start, the main navigation controller would load up HomeNavigationController which points to "Home" as the root view and the user would progress through an order process where push/pop works as expected.</li>
  <li>If the user tapped My Account, I would reset the main navigation controller array to the account navigation controller (account view controller would be the root) and the user would continue there. I would keep a handle on the HomeNavigationController so that that the position of the user is maintained should they tap Menu, Home (i.e. I would reset the Main Navigation Controller back to the HomeNavigationController reference where the stack would be in the state before they tapped My Account).</li>
  </ol>
  
  <p>Are there any reasons why this is a poor approach? </p>