title: xcode access class variable/property from other view controller
body: <p>I have a UITabBar application with 4 tabs. Each tab has it's own ViewController.</p>
  
  <p>Sometimes I want to access variables from Tab1ViewController in Tav2ViewControllerTab3.</p>
  
  <p>For example:</p>
  
  <p><strong>Tab1ViewController.h</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @interface Tab1ViewController : UIViewController {
  NSMutableArray *contentArray;
  }
  @property (nonatomic, retain) NSMutableArray *contentArray;
  @end
  </code></pre>
  
  <p><strong>Tab2ViewController.m</strong></p>
  
  <pre><code>#import "Tab2ViewController.h"
  #import "Tab1ViewController.h"
  @implementation Tab2ViewController
  - (void) viewDidLoad {
  NSLog(@"Data count Tab1: %@", [Tab1ViewController.contentArray count]);
  }
  </code></pre>
  
  <p>This is not working, because it seems as xcode expect contentArray to be a method. 
  But how can I access the property from another ViewController? What am I doing wrong?</p>
  
  <p>Thanks,
  Pat</p>