简体   繁体   中英

Unknown type error

In the following code in interface file I get the error "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;

In the same project I have RefreshScreen class defined RefreshScreen.h and RefreshScreen.m and they have no errors.

Any help is appreciated.

try using

@class RefreshScreen 

instead of

#import "RefreshScreen.h" 

More on this topic can be found here (about circling imports)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM