Reputation:
I have the following in a project named testApp: (testAppViewController is the valid name of my view controller in the project)
PrevView.h
#import <UIKit/UIKit.h>
#import "testAppViewController.h"
@interface PrevView : UIView {
testAppViewController *viewController;
}
@property (nonatomic,retain) testAppViewController *viewController;
@end
When I build the project I'm getting the following error:
PrevView.h:13: error: expected specifier-qualifier-list before 'testAppViewController'
Am I missing something here? Any ideas?
Upvotes: 2
Views: 212
Reputation: 75067
Does "testAppViewController.h" import "PrevView.h"?
If so, you may want to delcare a forward class reference:
@class testAppViewController;
that replaces the import you have, and move the import into the .m file.
Upvotes: 3
Reputation: 9169
Usually when I see this type of error, it's a problem in the header file that you're trying to import. Check "testAppViewController.h"
Upvotes: 1