title: Objective-C Cannot find interface declaration
body: <p>I have been scratching my head for awhile trying to figure this one out.</p>
  
  <p>I have the following .h files</p>
  
  <pre><code>//ClassA.h
  #import "ClassB.h"
  
  @interface ClassA {
  }
  
  @property SomeEnum blah;
  
  @end
  
  //ClassB.h
  #import "ClassA.h"
  
  typedef enum SomeEnum
  {
       value1,
       value2
  }SomeEnum;
  
  @interface ClassB {
  }
  
  @property SomeEnum otherblah;
  
  @end
  
  @interface ClassA (Category) {
  }
  
  @end
  </code></pre>
  
  <p>I think the problem is that ClassA needs SomeEnum from ClassB and so it needs to import it, and ClassB needs ClassA for its category so it needs to import it.  Is there a problem with them importing each other?  Do I need to include a third class?</p>
  
  <p>Here are the compiler errors I'm getting:</p>
  
  <pre><code>In ClassB.h: Cannot find interface declaration for 'ClassA'
  In ClassA.h: Unknown type name 'SomeEnum'
  </code></pre>
  
  <p><strong>EDIT:</strong>  I got it to work by moving the category declaration into ClassA and then having an @class ClassA in ClassB.h...but I'm still not sure why it wouldn't work in the first place</p>