Cannot find protocol declaration!

Discussion in 'Mac Programming' started by Duke Leto, Jun 23, 2009.

  1. Duke Leto macrumors regular

    Mar 17, 2008
    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!!!!
  2. kainjow Moderator emeritus


    Jun 15, 2000
    You need to #import the file where that protocol is defined into the header where you declare your class.
  3. Duke Leto thread starter macrumors regular

    Mar 17, 2008
    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.

Share This Page