title: How to display an activity indicator while loading in app purchase?
body: <p>I have a button that calls the in app purchase feature. I would to display a loading wheel while it is loading the product and the dismiss it when the UIAlertView to confirm the purchase appears. I am using the MBAlertView to show other messages in my app and I would to use it also here. 
  How can I do it? I want to display it when the user presses the button and dismiss it when it receives a response.</p>
  
  <p>Here is my code at the moment!</p>
  
  <pre><code>- (IBAction)buyCoffeeInAppPurchase:(id)sender {
      SKProductsRequest *request= [[SKProductsRequest alloc]
                                   initWithProductIdentifiers: [NSSet setWithObject:     @"com.giovannibalestra.emergencycall.Thankyoudeveloper"]];
      request.delegate = self;
      [request start];
      // I should add something like this line of code to show the activity indicator but I can only set hidesAfter some seconds
      // [MBHUDView hudWithBody:@"Wait." type:MBAlertViewHUDTypeActivityIndicator hidesAfter:4.0 show:YES];
  }
  - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
      [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
  
      NSArray *myProduct = response.products;
      NSLog(@"%@",[[myProduct objectAtIndex:0] productIdentifier]);
  
      SKPayment *newPayment = [SKPayment paymentWithProduct:[myProduct objectAtIndex:0]];
      [[SKPaymentQueue defaultQueue] addPayment:newPayment];
  
  }
  
  - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
      for (SKPaymentTransaction *transaction in transactions)
      {
          switch (transaction.transactionState)
          {
              case SKPaymentTransactionStatePurchased:
                  [self completeTransaction:transaction];
                  break;
              case SKPaymentTransactionStateFailed:
                  [self failedTransaction:transaction];
                  break;
              case SKPaymentTransactionStateRestored:
                  [self restoreTransaction:transaction];
              default:
                  break;
          }
      }
  }
  
  - (void)completeTransaction:(SKPaymentTransaction *)transaction {
      [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
  }
  
  - (void)restoreTransaction:(SKPaymentTransaction *)transaction {
      [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
  }
  
  - (void)failedTransaction:(SKPaymentTransaction *)transaction {
      if (transaction.error.code != SKErrorPaymentCancelled)
      {
          UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Purchase Unsuccessful"
                                                          message:@"Your purchase failed. Please try again."
                                                         delegate:self
                                                cancelButtonTitle:@"OK"
                                                otherButtonTitles:nil];
          [alert show];
      }
      [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
  }
  </code></pre>