iphone - 找不到 'AbstractPickerView' 的接口(interface)声明, 'AttackLayer' 的父类(super class)

标签 iphone objective-c ios inheritance

一段时间以来,我一直在为这个问题摸不着头脑,希望多一双眼睛能有所帮助:我收到“无法找到‘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/

相关文章:

iphone - 如何提高 iPhone 上的 OpenCV 性能?

ios - 在关闭 View 之前调用委托(delegate)方法

iphone - 正确释放一个 viewController,将其自身设置为其他类的委托(delegate)?

ios - 如何在 UIPickerView 中为每一行添加分隔线

iphone - GameCenter GKMatchmakerViewController 自动匹配不起作用,expectedPlayerCount 始终为 1,解决方案?

iphone - Objective-C 中的 "implicit declaration of function"错误

ios - 使用文本字段将字符串添加到 NSMutableArray

ios - 如何将 ImageView 颜色设置为文本字段背景颜色

java - 在android代码中没有得到web服务的响应

ios - 核心数据自动迁移不起作用