Cannot find protocol declaration in Xcode
Posted
by edie
on Stack Overflow
See other posts from Stack Overflow
or by edie
Published on 2010-04-29T12:13:31Z
Indexed on
2010/04/29
12:17 UTC
Read the original article
Hit count: 1210
Hi.. I've experienced something today while I'm building my app. I've added a protocol in my object and assign delegate object on it. I added the protocol on the object that will implement the protocol's method. I've added it in this way as usual
@interface MyObject : UIViewController <NameOfDelegate>
But the Xcode says that my the protocol declaration cannot be found. I've check my code but I've declared this protocol. I've try to assign MyObject as delegate of other Object. I've edit my code like this
@interface MyObject : UIViewController <UITableViewDelegate,NameOfDelegate>
but Xcode say again that it cannot found declaration of protocol of NameOfDelegate. I've tried to delete the NameOfDelegate on my code and add assign MyObject as delegate of other object and it goes like this.
@interface MyObject : UIViewController <UITableViewDelegate,UITabBarDelegate>
No errors have been found. Then I've tried again to add again my NameOfDelegate in the code
@interface MyObject : UIViewController <UITableViewDelegate,UITabBarDelegate,NameOfDelegate>
At that time Xcode did not find any error on my code. So I tried again to remove the UITableViewDelegate and UITabBarDelegate on my code.
@interface MyObject : UIViewController <NameOfDelegate>
At that time No error had found but that was the same code I've write before. What should probably the cause of that stuff on my code?
Thanks...
© Stack Overflow or respective owner