Search code examples
iosxcode4

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.


Solution

  • 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