title: Programmatically tap UIButton not working
body: <p>I have an iPad app using XCode 4.6, Storyboards, iOS 6.2. I looked at SO and Google, but nothing about <strong>when</strong> to send the message to the button.
  <br>I am trying to save some data to CoreData when the user leaves a "scene" but it's not working. <br>Here is the code:</p>
  
  <pre><code>-(void) viewWillDisappear:(BOOL)animated  {
  
       [bSavePreferences sendActionsForControlEvents:UIControlEventTouchUpInside];
  
  }
  </code></pre>
  
  <p>-bSavePreferences is in the same class as viewWillDisappear, but it never gets called. Why?</p>
  
  <p><strong>UPDATE:  I should have mentioned that I am using a UITabBarController to control which page is selected.</strong></p>