title: Accessing IB object/controll from a class method
body: <p>Are the objects/controls that you created using IB accessible from a class method?</p>
  
  <p>@Nekto:</p>
  
  <pre><code>@interface CopyController : UIViewController
  {
      UIActivityIndicatorView *myActivity;
  }
  
  @property (nonatomic, retain) IBOutlet UIActivityIndicatorView *myActivity;
  +(void) activityIndicator:(BOOL)flag;
  
  @end
  </code></pre>
  
  <p>This implementation in the .m will not be allowed, the error was "Instance variable'myActivety' accessed in class method".  </p>
  
  <pre><code>+(void)activityIndicator:(BOOL)flag
  {
      if (flag)
          [myActivity startAnimating];
      else
          [myActivity stopAnimating];
  }
  </code></pre>