title: Access IBOutlet from other class (ObjC)
body: <p>I've googled around and found some answers but I didn't get any of them to work. I have one NSObject with the class "A" and a second class "B" without an NSObject. In class "A" are my IBOutlets defined and I can't seem to figure out how to access those outlets from class "B"...</p>
  
  <p>I've found answered questions like <a href="http://forums.macrumors.com/archive/index.php/t-662717.html" rel="nofollow noreferrer">http://forums.macrumors.com/archive/index.php/t-662717.html</a> But they're confusing.</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>Simplified Version of the Code:</p>
  
  <pre><code>aClass.h:
  
  #import &lt;Cocoa/Cocoa.h&gt;
  
  @interface aClass : NSObject {
      IBOutlet NSTextField *textField;
  }
  @end
  
  
  aClass.m:
  
  #import "aClass.h"
  
  @implementation aClass
  // Code doesn't matter
  @end
  
  
  bClass.h:
  
  #import &lt;Cocoa/Cocoa.h&gt;
  
  @interface bClass : NSObject {
  }
  @end
  
  
  bClass.m:
  
  #import "aClass.h"
  #import "bClass.h"
  
  @implementation bClass
      [textField setStringValue: @"foo"];
  @end
  </code></pre>