objective c - mutually referencial .h files? -


I'm sure that I'm really feeling dumb when I remember how to do it, but here It is:

I have two classes A and B is B. A type of B, B is a type of B. It is not uncommon. The problem is that B.H. Import and vice versa. However, one of these should be first, and when this happens, the other uses fail to compile.

I know that there is really a dumb / easy way to do this, and I do not remember it, and today my google-fu is weak ...

In Objective-C, you can declare a class using @ class classname . Before you use it in A, then you use @class A and @class B before using it in B.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -