Re: Xcode warns about missing protocol definition, even though @protocol is used
Re: Xcode warns about missing protocol definition, even though @protocol is used
- Subject: Re: Xcode warns about missing protocol definition, even though @protocol is used
- From: Kyle Sluder <email@hidden>
- Date: Sat, 14 Apr 2012 10:00:02 -0700
On Apr 14, 2012, at 5:55 AM, Florian Pilz wrote:
> NewFooController.h:
> #import <UIKit/UIKit.h>
> @protocol NewFooControllerDelegate;
> @interface NewFooController : UITableViewController
> @property (nonatomic, weak) id<NewFooControllerDelegate> delegate;
> @end
>
> @protocol NewFooControllerDelegate
> @end
>
> HomeTableViewController.h:
> #import <UIKit/UIKit.h>
> // warning points to line below
> @interface HomeTableViewController : UITableViewController <NewFooControllerDelegate>
> @end
You never imported NewFooController.h here, so when the compiler is compiling something that imported HomeTableViewController.h, it can't find the @protocol definition.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden