PDA

View Full Version : Cannot find protocol declaration!




Duke Leto
Jun 23, 2009, 11:00 PM
I made a delegate for a custom class, and I used a formal protocol declaration. However, when I make a class conform to that protocol, I get an error that the declaration was not found, and it is there!!!!



kainjow
Jun 23, 2009, 11:04 PM
You need to #import the file where that protocol is defined into the header where you declare your class.

Duke Leto
Jun 23, 2009, 11:17 PM
Well, after looking at my #import statements, I realized that the problem was a strange import loop, where I should have used @class. Thanks for pointing me in the right direction!

It's funny how problems seem so much simpler here.
:D