title: viewDidLoad and viewWillAppear with tab bar controller
body: <p>I'm looking into the viewDidLoad and viewDidAppear methods to better understand what they both do and I came across an <a href="http://stablekernel.com/blog/uiviewcontroller-best-practices-viewwillappear-or-viewdidload/" rel="noreferrer">article</a> which uses the example of a banking application to explain how these methods work:</p>
  
  <blockquote>
    <p>Consider a banking application that shows your current balance. A user
    can tap on a button, which presents a list of nearby ATMs in a modal
    view controller. In order to get the list of nearby ATMs, the
    application must make a core location and web service request.</p>
    
    <p>In this situation, a programmer could get away with requesting the
    list of nearby ATMs from the server in viewDidLoad. The view
    controller is only presented once, both viewDidLoad and
    viewWillAppear: will be called back to back and only once for that
    particular view controller instance. The net effect of the code in
    either of these two methods will be the same.</p>
    
    <p>But this is a bad idea. Consider what would happen if you wanted to
    move the ATM view controller into a tab bar controller. Now, the ATM
    view controller – with its ATM fetching code in viewDidLoad only
    fetches the list of ATMs once. So you are in Atlanta on Tuesday, open
    up your application to look for an ATM, then check your balance. Then
    you travel to New York on Wednesday, re-open the banking application,
    and you only see ATMs in Atlanta. The view was already loaded, no need
    to call viewDidLoad and now you’re looking at stale data.</p>
  </blockquote>
  
  <p>Sadly, I still don't fully understand how/why both viewDidLoad and viewWillAppear will be called 'back to back', or what adding the ATM view controller to a tab bar controller means in terms of these methods. </p>