我有以下 Objective-C 标头:
// Menu.h
#import <UIKit/UIKit.h>
#import "GameController.h"
@interface Menu : UIImageView {
GameController *gameController; // "Expected specifier-qualifier-list
// before GameController"
}
- (void)appear;
@end
和
// GameController.h
#import <UIKit/UIKit.h>
#import "Menu.h"
@interface GameController : UIView {
Menu *menu; // "Unknown type name 'Menu'"
}
- (void)startLevel0;
- (void)startLevel1;
- (void)startLevel2;
@end
当我尝试构建项目时,Xcode (v4) 对我大喊大叫,说Expected specifier-qualifier-list before GameController
and unknown type name 'Menu'
. 我确定它们在某种程度上是相关的,但我不知道如何?