一段时间以来,我一直在为这个问题摸不着头脑,希望多一双眼睛能有所帮助:我收到“无法找到‘AbstractPickerView’的接口(interface)声明,‘AttackLayer’的父类(super class)。问题是我已经导入了所有必要的头文件,我唯一能想到的就是多级继承
接口(interface)如下:
@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
最佳答案
解决了这个问题,我不敢相信我思考了这么多小时,我用@class 替换了界面中的 header 导入,移动了 AbstractPickerView.m 中的导入并解决了问题
关于iphone - 找不到 'AbstractPickerView' 的接口(interface)声明, 'AttackLayer' 的父类(super class),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10269246/