2013-04-18 51 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 
相關問題