title: applicationWillTerminate, delegate or view?
body: <p>I am looking to save some settings when my application exits and I am a little confused about the 2 different versions below. My feeling is that to better fit the MVC pattern I should be using the version in the viewController. I am just curious as most folks don't seem to do much in the appDelegate when that call would be used?</p>
  
  <p>AppDelegate</p>
  
  <pre><code>-(void)applicationWillTerminate:(UIApplication *)application {
      NSLog(@"_deli: applicationWillTerminate");
  }
  </code></pre>
  
  <p>ViewController</p>
  
  <pre><code>-(void)applicationWillTerminate:(NSNotification *)notification {
      NSLog(@"_view: applicationWillTerminate");
  }
  </code></pre>
  
  <p>many thanks</p>
  
  <h1>EDIT_001:</h1>
  
  <p>Sorry, I should claifiy, you would also need to add (see below) to the ViewController to make the above work.</p>
  
  <pre><code>UIApplication *app = [UIApplication sharedApplication];
  [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(applicationWillTerminate:)
                                                   name:UIApplicationWillTerminateNotification 
                                                 object:app];
  </code></pre>
  
  <p>gary</p>