title: AppDelegate: Get value from ViewController?
body: <p>I would like to get at </p>
  
  <pre><code>- (void)applicationWillTerminate:(UIApplication *)application
  </code></pre>
  
  <p>a variable from a view controller class.
  I have build an tabbar application and only added the tabbar controller to the appdelegate.</p>
  
  <pre><code>[window addSubview:tabBarController.view];
  </code></pre>
  
  <p>How can i get an variable from the TestViewController:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;AVFoundation/AVFoundation.h&gt;
  
  @interface TestViewController : UIViewController {
      IBOutlet UILabel *testLabel;
      NSString *currentString; //Value that i want to save at applicationWillTerminate
  }
  
  @property (nonatomic, retain) UILabel* testLabel;
  @property (nonatomic, retain) NSString* currentString;
  
  @end
  </code></pre>