无法找到'AbstractPickerView'的接口声明,'AttackLayer'的超类

时间:2012-04-22 15:28:44

标签: iphone objective-c ios inheritance

我已经在这个问题上抓了一段时间了,并希望额外的一双眼睛会有所帮助:我得到一个“无法找到'AbstractPickerView'的接口声明,'AttackLayer'的超类。麻烦就是我导入了所有必要的头文件,我唯一能想到的就是多级继承

这是接口:

@interface AttackLayer   : AbstractPickerView    <<< this is the one which gets the error
@interface AbstractPickerView: AbstractLayer <UIPickerViewDelegate>
@interface AbstractLayer : CCLayer

有谁能看到这里出了什么问题?

#import <Foundation/Foundation.h>   
#import "AbstractPickerView.h"    


@interface AttackLayer   : AbstractPickerView 

{
    CCMenu *buyPowerButton;

    CCMenu *finishBuyPower;

    id playerUI;

}

-(id) init:(PlayerController *)playerControl withObject:(id)object;

-(void)spendAttack:(id)sender;

-(void)spendResist:(id)sender;

-(void)transferPower:(id)sender;

-(void)timeOut;

-(void)commenceAttack:(id)sender;

-(void)appear;

-(void)buyPower:(id)sender;

-(void)reloadButtons;

-(void)buyPowerButtons;

-(void)cleanUpPicker:(id)sender;

@property(nonatomic,retain)id playerUI;

@property(nonatomic,retain) CCMenu *button2;

@property(nonatomic,retain) CCMenu *button3;

@property(nonatomic,retain) CCMenu *buyPowerButton;

@property(nonatomic,retain) CCMenu *finishBuyPower;

@property(nonatomic,retain)CCMenu *starMenu;


@end

1 个答案:

答案 0 :(得分:5)

解决了这个问题,我无法相信我思考了这么多个小时,我用@ class替换了接口中的头部导入,移动了AbstractPickerView.m中的导入并修复了问题