ios - 未知类型错误

标签 ios xcode4

在接口(interface)文件的以下代码中,我收到错误“Unknown type name RefreshScreen”

#import <UIKit/UIKit.h>
#import <Storekit/Storekit.h>
#import "RefreshScreen.h"

@interface ViewControllerWordHelper : UIViewController <SKProductsRequestDelegate,    SKPaymentTransactionObserver, UITextFieldDelegate, UIAlertViewDelegate> {    

RefreshScreen *rs;
}

@property(nonatomic, retain) RefreshScreen * rs;

@end;

在同一个项目中,我定义了 RefreshScreen 类 RefreshScreen.h 和 RefreshScreen.m,它们没有错误。

感谢任何帮助。

最佳答案

尝试使用

@class RefreshScreen 

代替

#import "RefreshScreen.h" 

可以在此处找到有关此主题的更多信息(关于循环导入)

Objective-C header file not recognizing custom object as a type

关于ios - 未知类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9496932/

相关文章:

ios - NSMutableURLRequest 超时间隔

iphone - 如何在 XCode 4 中缩短 iPhone 应用程序的显示名称,但保留与 iTunes Connect 中的应用程序名称相匹配的较长产品名称?

ios - 创建一个选择器 View 以在多个 ViewController 上使用

macos - EXC_BAD_ACCESS 当我关闭窗口时,这也是我的应用程序的委托(delegate)

iphone - 代码 : How to change all fonts at once in an app?

ios - 在iOS中访问外部SQL数据库

iphone - Xcode 4.2 编译错误

ios - 如何创建枚举类型的 IBInspectable

ios - 使用 openSystem API 从 Apple Watch 调用电话?

ios - UITextField 自动开始编辑模式