在接口(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/