我认为其中一个会这样做,没有一个被称为-_-
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
NSLog(@"flag paymentQueue");
// spinner.hidden = YES; //这是哪里的?
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchasing:
// [self stillPurchasing]; // this creates an alertView and shows
NSLog(@"flag SKPaymentTransactionStatePurchasing");
break;
case SKPaymentTransactionStatePurchased:
NSLog(@"flag SKPaymentTransactionStatePurchased");
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
NSLog(@"flag SKPaymentTransactionStateFailed");
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
NSLog(@"flag SKPaymentTransactionStateRestored");
[self restoreTransaction:transaction];
// spinner.hidden=YES;
break;
感谢!!!
答案 0 :(得分:1)
你检查过你的代表吗?
你的类应该实现委托方法:
- > SKPaymentTransactionObserver
我的声明如下: @interface InAppPurchaseStoreManager:NSObject
答案 1 :(得分:1)
您可以使用以下方法隐藏微调器 -
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
[target hideSpinner];
}