What you need is called forward declaration and declare it by just adding the declaration before the interface of the other class in the header file.
@class ClassB;
@interface ClassA
...
Mind that you don't need to do it, you need it just if any method signature requires a type which is not defined and cannot be imported in the header file, if you have a @property
of that type or if you have class member of that type.
Basically: if the type name appears in the header then you need to forward declare it (or #import
the header), otherwise you can just #import
inside .m
file. You don't have to import the header inside the other header, importing inside the implementation file is enough.