我添加了一个UIAlertView,它将UIActivityIndicatior作为我的应用程序的子视图。此alertView仅显示购买正在进行的时间。当在应用程序购买UIAlertView显示时,如何隐藏我的等待屏幕?
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchasing:
[self stillPurchasing]; // this show a waiting screen
break;
case SKPaymentTransactionStatePurchased:
NSLog(@"2");
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
NSLog(@"4");
[self restoreTransaction:transaction];
break;
default:
NSLog(@"5");
break;
}
}
}
谢谢。
答案 0 :(得分:0)
如果您保留它直到购买操作完全完成将更有用..这意味着在案例1(SKPaymentTransactionStatePurchased)您隐藏了指示,也不要忘记隐藏它以防购买失败。