您应该没有进度条,或者制作另一个 AlertView,SKPaymentStatePurchasing
然后制作void
:
- (void) purchasingProductAlertShow {
UIAlertView *purchasingProductAlert = [[UIAlertView alloc]
initWithTitle:@""
message:[NSString stringWithFormat:@"Loading..."]
delegate:nil
cancelButtonTitle:@""
otherButtonTitles:nil];
[purchasingProductAlert show];
}
或类似的东西,然后,SKPaymentStatePurchased
你purchasingProductAlert = nil;
可能想要制作自己的自定义警报视图以进行购买。
您还可以在购买完成时提醒他们,您可以这样SKPaymentStatePurchased
做void
:
- (void) purchasedProductAlertShow {
UIAlertView *purchasedProductAlert = [[UIAlertView alloc]
initWithTitle:@"Complete!"
message:[NSString stringWithFormat:@"Your purchase is complete! You will now be able to enjoy no ads!"]
delegate:nil
cancelButtonTitle:@"Okay!"
otherButtonTitles:nil];
[purchasedProductAlert show];
}
对于您想在其中放置任何内容的消息,我以删除广告为例。然后和SKPaymentStatePurchased
你[self purchasedProductAlertShow]
的任何其他代码一样。这将使得当用户完成购买时,它会显示警报purchasingProductAlert