
BirdsListVIEwController.h
#import <UIKit/UIKit.h>@class BirdsListDataController;@interface BirdsListVIEwController : UItableVIEwController <UITextFIEldDelegate>{// NSMutableArray *listofBirds;IBOutlet UITextFIEld *addNewBirdTextFIEld;}//@property (nonatomic,retain) NSIndexPath *checkedindexPath;@property (nonatomic,retain) Nsstring *textLabelContents;@property (nonatomic,retain) NSMutableArray *workingArray;@property (strong,nonatomic) BirdsListDataController *dataController;@property (strong,nonatomic) IBOutlet UItableVIEw *birdListtableVIEw;@end BirdsListVIEwController.m
#import "BirdsListVIEwController.h"#import "BirdsListDataController.h"@interface BirdsListVIEwController ()@end@implementation BirdsListVIEwController- (ID)initWithStyle:(UItableVIEwStyle)style{ self = [super initWithStyle:style]; if (self) {... BirdsListDataController.h
#import <Foundation/Foundation.h> @class Birdname;@interface BirdsListDataController : NSObject@property (nonatomic,copy) NSMutableArray *listofBirds;-(NSUInteger)countOfList;-(Birdname *)objectInListAtIndex:(NSUInteger)theIndex;-(voID)addBirdnameWithname:(Birdname *)bname;@end
BirdsListDataController.m
#import "BirdsListDataController.h"//#import "BirdsListVIEwController.h"#import "Bird.h"@implementation BirdsListDataController-(ID)init{... 我仍然是iOS和Objective C的新手,所以希望我的代码不是太难以排除故障.谢谢您的帮助.
解决方法 我不确定是什么导致了你的问题,但有一些事情:>在您提供的代码中,没有理由不在BirdListVIEwController.h中导入BirdListDataController.h,因为在BirdListDataController.h中没有对BirdListVIEwControllers的引用.所以尝试用#import语句替换你的@class声明.>在BirdListDataController.h中声明@class Birdname,但在BirdListDataController.m中导入Bird.h而不是Birdname.h.看起来有些东西可能出错了,虽然我必须看到Birdname.h和Bird.h的代码才能确定.
总结以上是内存溢出为你收集整理的objective-c – Xcode中的未知类型名称(即使使用@class声明)全部内容,希望文章能够帮你解决objective-c – Xcode中的未知类型名称(即使使用@class声明)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)