title: Objective C's Instance Variables, why should I declare them?
body: <p>I'm having a hard time understanding why I need to declare Instance Variables. Let me explain what I mean..</p>
  
  <p>for example..</p>
  
  <pre><code>@interface LearningViewController : UIViewController {
    UILabel *myText; // &lt;--- Instance Variables
  }
  
  @property (nonatomic,retain) IBOutlet UILabel *myText;
  
  -(IBAction)method:(id)sender;
  
  @end
  </code></pre>
  
  <p>this can also be done as </p>
  
  <pre><code>@interface LearningViewController : UIViewController {
    //instance variables go here, but are not declared, I just leave this field blank
  }
  
  @property (nonatomic,retain) IBOutlet UILabel *myText;
  
  -(IBAction)method:(id)sender;
  
  @end
  </code></pre>
  
  <p>as you can see.. in the latter example I ONLY built the setter / getter for the UILabel *myText</p>
  
  <p>but in the former I declared the Instance Variables too. </p>
  
  <p>Both end up working in the end </p>
  
  <pre><code>@implementation LearningViewController
  
  @synthesize myText;
  
  
  -(IBAction)method:(id)sender {
    [myText setText:@"hey"];
  
    //or
  
    NSString *myObject = [[NSString alloc]initWithString:@"hey"];
  
    [myText setText:myObject];    
  }
  </code></pre>
  
  <p>now both things produce the same result. So my question is, why? and what are the benefits of doing them either way?
  And why would I build and object </p>
  
  <pre><code>NSString *myObject = [[NSString alloc]initWithString:@"hey"];
  
  myText.text = myObject;
  </code></pre>
  
  <p>when I can just do </p>
  
  <pre><code>[myText setText:@"hey"];
  </code></pre>
  
  <p>thanks in advance.</p>