title: How to make the most recent UISegmentedControl tab persist throughout the length of just the app session it was clicked in?
body: <p>So I have a <code>UISegmentedControl</code> consisting of four tabs. What I need to do is make it so the most recently tapped tab will be remembered throughout the length of the app session. That is, when the app is first started the first <code>UISegmentController</code> tab will be selected, then the user clicks the third tab, then the user decides to go to a different view in the app, and then when the user comes back to the view with the <code>UISegmentedControl</code> the most recent(third in this case) tab is still be selected.</p>
  
  <p>I've seen that the <code>NSUserDefaults</code> class is good for saving settings, BUT to my understanding the <code>NSUserDefaults</code> class saves data in a manner that even when the app is killed and then started it restores the previous settings saved. Which is something that I do not want, I only want the app to save the most recently selected tab for the length of the app session it was selected in.</p>
  
  <p>I hope I am making sense, if more information/code/explanation is needed please let me know.</p>
  
  <p>Thank you very much.</p>