title: “Property implementation must have its declaration in interface” error in iOS
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7420100/objective-c-property-implementation-must-have-its-declaration-in-interface">Objective C: &ldquo;Property implementation must have its declaration in interface&rdquo;</a>  </p>
  </blockquote>
  
  
  
  <p>I have a declared a object of a viewController globally in another viewController. </p>
  
  <p><strong>I am pretty sure that</strong> </p>
  
  <p>1- i have imported the necessary viewController class</p>
  
  <p>2 - i have witten the @property(nonatomic, retain) for that object in .h file</p>
  
  <p>3 - i have synthesized the same object .m file</p>
  
  <p>But still i am getting the error saying that <strong>“Property implementation must have its declaration in interface”</strong>.   What am i doing wrong here.... i'v been scratching my head on this issue....</p>
  
  <p><strong>.h file</strong></p>
  
  <pre><code>#import "viewController1.h"
  
  @interface viewController2 :UIViewController&lt;UITableViewDelegate,UITableViewDataSource&gt;{        
      viewController2 *vc2;
  }
  
  @property(nonatomic,retain)viewController2 *vc2;
  
  -(void)someMethod;
  
  @end
  </code></pre>
  
  <p><strong>.m file</strong></p>
  
  <pre><code>#import "viewController2.h"
  
  @implementation viewController2
  
  @synthesize vc2;
  
  @end
  </code></pre>