title: Passing a NSString to another ViewController using classes
body: <p>I know this insanely simple, but I am re-teaching myself the basics and trying to get my head around this:-)</p>
  
  <p>I have one ViewController called MainVC and I have one called ClassVC</p>
  
  <p>In ClassVC I have this code:</p>
  
  <pre><code>@interface ClassVC : UIViewController
  {
     NSString *mainLine;
  }
  
  @property (nonatomic, retain) NSString *mainLine;
  @end
  </code></pre>
  
  <p>and I have this in the implementation file:</p>
  
  <pre><code>@synthesize mainLine = _mainLine;
  
  -(NSString *)_mainLine
  {
      _mainLine = @"This a string from a Class";
      return _mainLine;
  }
  </code></pre>
  
  <p>Now I was thinking that if I #import the ClassVC into MainVC I would be able to transfer that string along as well like so:</p>
  
  <pre><code> This code is in the viewDidLoad
  
      _mainLabel.text = _secondClass.mainLine;
  
      NSLog(@"%@", _secondClass.mainLine);
  </code></pre>
  
  <p>But that is not working - so cannot I not pass strings in through this way???</p>