title: Differentiate between applicationDidEnterBackground and applicationWillTermimate
body: <p>In my application when user hits home button I save the data in <code>NSUserDefaults</code>. Application is running in background. When user re-launches the app I use the method <code>applicationWillEnterForeground</code> to display the saved data.</p>
  
  <p>However when user double taps on home button and quit the application by selecting minus sign on the app, I need to save different data in that same user defaults. But when I quit the application <code>applicationWillTerminate</code> is called sometimes and sometimes not.</p>
  
  <p>So, how can I differentiate that the application is just minimized or it is quit?</p>