title: Importing an existing Object in Objective C
body: <p>How does one use an already existing object from another class?</p>
  
  <p>e.g. Have a object of Class1 and want to set its variables from Class2.</p>
  
  <p>What does one import? Is it just necessary to import the Class1, will this make the object available to the class that imported?</p>
  
  <p>In a class e.g. Main Class1 is created and presented </p>
  
  <pre><code>- (IBAction) openClass1 {
      Class1 *c = [[Class1 alloc]initWithNibName:@"Class1" bundle:nil];
      [self presentModalViewController:c animated:NO];
      [c release];
  }
  </code></pre>
  
  <p>Then Class1 would have many properties (I only made one here)</p>
  
  <pre><code>@interface Class1 : UIViewController {
      UIImageView *image;
  }
  @property(nonatomic, retain) UIImageView *image;
  @end
  </code></pre>
  
  <p>I would like to edit the Class1 variables in Class2 and then dismiss the Class2 view and see the changes in Class1. e.g. a label with new text or a UIImage with another image set to it etc.</p>