title: Function called on viewController close (when application exit)?
body: <p>I am looking for a function which is called on a <code>UIViewController</code> when the application exits. </p>
  
  <p>I tried it out with <code>viewWillDisappear</code> and with <code>applicationWillTerminate</code> but nothing works. </p>
  
  <p>I want to save my settings from the <code>UIViewController</code> in this function.</p>