“未知类型名称'ViewController'的意思是'UIViewController'”
这就是我得到的错误
#import <UIKit/UIKit.h>
#import <StoreKit/StoreKit.h>
#import "ViewController.h"
@interface PurchaseViewController : UIViewController <SKPaymentTransactionObserver, SKProductsRequestDelegate>
@property (weak, nonatomic) IBOutlet UILabel *productTitle;
@property (weak, nonatomic) IBOutlet UIButton *buyButton;
@property (weak, nonatomic) IBOutlet UITextView *productDescription;
- (IBAction)buyProduct:(id)sender;
@property (strong, nonatomic) SKProduct *product;
@property (strong, nonatomic) NSString *productID;
@property (strong, nonatomic) ViewController *homeViewController; //error here
- (void)getProductInfo:(UIViewController *)viewController;
@end
答案 0 :(得分:2)
在@interface
语句之前,添加如下所示的行:
@class ViewController;
看看是否有帮助。
答案 1 :(得分:0)
您需要导入可可库!
' <t:AdditionalProperties>' +
' <t:FieldURI FieldURI="item:TextBody"/>' +
' </t:AdditionalProperties>' +
这应该可以解决问题。