When the purchaseButton
is chosen it starts the process of purchasing an IAP, which will segue the user to the next ViewController
.
I need to figure out how to get the segue to hold off on sending the user to the next ViewController
until the IAP transaction has completed.
Any suggestions? Will post any extra code as needed. Thanks!
Segue
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
if ([segue.identifier isEqualToString:@"leaguesEdit"]) {
UIButton *button = (UIButton *)sender;
MREditLeaguesViewController *levc = (MREditLeaguesViewController *)segue.destinationViewController;
levc.buttonNumber = (int)button.tag;
NSLog(@"LEVC #: %d", (int)button.tag);
}
else if ([segue.identifier isEqualToString:@"nothing"]) {
// Nothing
}
}
The segue
is hooked up from the ViewController
. And the IBAction
it sits in is:
- (IBAction)purchase:(id)sender {
[self purchaseProduct:[validProductsInStore objectAtIndex:0]];
NSLog(@"IBAction Purchase");
[self performSegueWithIdentifier:@"leaguesEdit" sender:sender];
}