views:

164

answers:

2

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?

+1  A: 

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"

Reed Olsen
+3  A: 

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.

Kendall Helmstetter Gelner