purchasedViewController

purchasedViewController

在我的应用中
它显示出一些错误,例如:

 "unknown type name 'purchasedViewController'; DId you mean 'UIPageViewController'?


但是实际上有一个名为purchasedViewController的VC,我已经在当前VC中导入了它。

但是当我在当前VC中创建purchasedViewController的对象时,例如:

@property(strong, nonatomic) purchasedViewController *purchasedController;


我收到一条错误消息说:

"unknown type name 'purchasedViewController'; DId you mean 'UIPageViewController'?


为什么会发生?知道吗?

**************编辑**************
这是我的“ .h”文件

#import <UIKit/UIKit.h>
#import <StoreKit/StoreKit.h>
#import "PurchasedViewController.h"

@interface MainScreenViewController : UIViewController
- (IBAction)purchaseItemAction:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *Label;

@property(strong,nonatomic) PurchasedViewController *purchaseController;

-(void)Purchased;

@end

最佳答案

尝试给转发声明像

  @class purchasedViewController;
  @interface MainScreenViewController : UIViewController


  @end


我觉得对你有用

10-08 12:12