I defined a protocol in ClassA
, and want ClassB
to conform to it, so in ClassB
I have <ClassADelegate>
.
It keeps complaining, however, that it can't find that specific protocol. I understand why, I'm claiming to conform to a protocol in the .h file, but that class is #import
ed in the .m file, so it doesn't know about it yet.
So I tried a forward @class
declaration, and even a forward @protocol
declaration, but neither one worked, it still doesn't know about the protocol I'm specifying.
My only option left seems to be to import it in the .h file instead of the .m file, but everything I've heard indicates that you shouldn't be importing in the .h, I've been personally bit by circular reference bugs and I'm very hesitant to do this.
What should I do?