0

一段时间以来,我一直在摸索这个问题,希望多一双眼睛会有所帮助:我收到“找不到'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
4

1 回答 1

5

解决了这个问题,我不敢相信我思考了这么多小时,我用@class替换了接口中的标题导入,移动了 AbstractPickerView.m 中的导入并解决了问题

于 2012-04-23T00:24:16.053 回答