Hey, let's say I have two objects, ObjectA and ObjectB, and I therefore have the files:
ObjectA.m
ObjectA.h
ObjectB.m
ObjectB.h
I also have another file which imports all the object headers for me, Headers.h. Inside, we have:
Okay - ObjectB is a subclass of ObjectA, and in both their header files, they #import "Headers.h" (so I don't have to #import long lists of headers when I have lots of classes, etc.)
The problem is when I compile. From what I can gather, Xcode compiles ObjectA.m, is taken to ObjectA.h, then Headers.h, and then ObjectB.h - but because ObjectB is a subclass of ObjectA, and ObjectA's @interface has not yet been "read", I get the error:
error: cannot find interface declaration for 'ObjectA', superclass of 'ObjectB'
So my question is, how can I get round this problem?
Thanks!
ObjectA.m
ObjectA.h
ObjectB.m
ObjectB.h
I also have another file which imports all the object headers for me, Headers.h. Inside, we have:
Code:
#import "ObjectA.h"
#import "ObjectB.h"
Okay - ObjectB is a subclass of ObjectA, and in both their header files, they #import "Headers.h" (so I don't have to #import long lists of headers when I have lots of classes, etc.)
The problem is when I compile. From what I can gather, Xcode compiles ObjectA.m, is taken to ObjectA.h, then Headers.h, and then ObjectB.h - but because ObjectB is a subclass of ObjectA, and ObjectA's @interface has not yet been "read", I get the error:
error: cannot find interface declaration for 'ObjectA', superclass of 'ObjectB'
So my question is, how can I get round this problem?
Thanks!