title: Objective C: Properties Not Found In Forward Declaration Vs Parse Issue: Expected A Type
body: <p>I have a singleton class called DataManager.  This class is used by several other classes to deal with loading and saving plist files.</p>
  
  <p>I am adding the ability for DataManager to save screenshots as well as plist files. This requires me to load the view I wish to take a screenshot of.  The view I'm loading comes from a controller that imports DataManager.</p>
  
  <p>Obviously this is circular dependency, so I used:</p>
  
  <pre><code>@class GardenView;
  </code></pre>
  
  <p>However, this resulted in the following errors:</p>
  
  <ul>
  <li>Receiver 'GardenView' for class message is a forward declaration </li>
  <li>Receiver type 'GardenView' for instance message is a forward</li>
  <li>declaration  Property 'bounds' cannot be found in forward class</li>
  <li>object 'GardenView'  Property 'layer' cannot be found in forward
  class object 'GardenView'</li>
  </ul>
  
  <p>This seems like it can't find properties inherited from the UIView superclass.  Is this true of forward class declarations?</p>
  
  <p>If I use the standard #import instead of @class, I get:</p>
  
  <ul>
  <li>Parse Issue: Expected A Type</li>
  </ul>
  
  <p>for the methods in GardenView referencing Plant (which I am importing just fine):</p>
  
  <pre><code>- (void) addPlantToView: (Plant*) plant;
  - (void) addPlantToGarden: (Plant*) plant;
  - (void) addPlantToViewAndGarden: (Plant*) plant;
  </code></pre>
  
  <p>The Plant class DOES import the DataManager, but if I change it to @class, I get:</p>
  
  <ul>
  <li>No known class method for selector 'sharedDataManager'</li>
  </ul>
  
  <p>What is the solution for this problem?  The class method is there in the header file (+sharedDataManager). Am I doing something completely wrong?</p>