
我会解释一下:
我的StorIEsVIEwController.h:
#import <UIKit/UIKit.h>#import "StorIEs.h"@interface StorIEsVIEwController : UIVIEwController <UITextVIEwDelegate>@property (strong) StorIEs *story; //Here it goes- "UnkNown type name `StorIEs`"@property (weak) IBOutlet UITextVIEw *storyVIEw;@end
在我的StorIEs.h中:
#import <UIKit/UIKit.h>#import "VIEwController.h"@interface StorIEs : UI@R_419_4617@@property (strong) Nsstring * storyContent;@end
突然之间,突然之间.
提前致谢.
编辑:
在我的VIEwController.h中:
#import <UIKit/UIKit.h>#import "StorIEs.h"#import "StorIEsVIEwController.h"#import "StorIEsPickerVIEwController.h"#import <QuartzCore/QuartzCore.h>@interface VIEwController : UIVIEwController <UITextFIEldDelegate,UIAlertVIEwDelegate> {}@end NB @class会引发大量的ARC问题.
我已经删除了对VIEwController.h的无用引用.
解决了!
发生了什么事情,当你加载你的VIEwController它通过它的导入,它加载StorIEs.h,它去加载它的导入,它返回到VIEwController.h,所以你陷入无限循环.
删除其中一个冲突的导入,或使用forward class declaration(该示例适用于C,有关Objective-C的示例,请参阅here)
总结以上是内存溢出为你收集整理的ios – 已知的未知类型名称?全部内容,希望文章能够帮你解决ios – 已知的未知类型名称?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)