2013-04-18 52 views
0

因此,我有一个名为IAP与.h和.m文件的类。 .h看起来像这样:无法识别的选择器发送到类错误

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

@interface IAP : UIViewController <SKProductsRequestDelegate,  SKPaymentTransactionObserver, UIAlertViewDelegate> 




+(void)myIAPWithItem; 

@end 

但是,当我调用函数myIAPWithItem我得到和错误。我这样称呼它:

[IAP myIAPWithItem]; 

此外还有一个项目paramater我刚刚拿下它来测试。

回答

1

你在你的.m文件中有一个实现吗?

// in IAP.m 

@implementation IAP 

+(void)myIAPWithItem { 
    // do something 
} 

@end 
相关问题