Reputation: 21
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@class ViewController;
@property (strong,nonatomic) ViewController *viewController;
@end
on the line of @class ViewController it says there is an illegal interface qualifier error. What does it mean and how can I fix it?
Upvotes: 2
Views: 5537
Reputation: 2287
just one to add for others, that I got also "illegal interface qualifier error" and I was 99% sure it's something with forward declaration..but then..on every time I change and try to fix this,xcode gave very strange errors that was not logical.
finally the problem was : missing @end on other header file..
unlucky...
Upvotes: 14
Reputation: 800
Declare
@class ViewController;
prior to
@interface AppDelegate : UIResponder <UIApplicationDelegate>
Upvotes: 10
Reputation: 3251
You need to put the @class ViewController outside of your @interface, like so:
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong,nonatomic) ViewController *viewController;
@end
Upvotes: 3