From 06aee2c5b0abb3dcd2e654f42233a32d853be41a Mon Sep 17 00:00:00 2001 From: Adam Roth Date: Thu, 25 May 2017 20:53:55 -0400 Subject: [PATCH] iOS option fixes. --- ios/RCTBraintree/RCTBraintree.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/RCTBraintree/RCTBraintree.m b/ios/RCTBraintree/RCTBraintree.m index 6d5f3f18..26e0faf2 100644 --- a/ios/RCTBraintree/RCTBraintree.m +++ b/ios/RCTBraintree/RCTBraintree.m @@ -79,9 +79,6 @@ - (instancetype)init if (tintColor) dropInViewController.view.tintColor = [RCTConvert UIColor:tintColor]; if (bgColor) dropInViewController.view.backgroundColor = [RCTConvert UIColor:bgColor]; - if (title) [dropInViewController.paymentRequest setTitle:title]; - if (description) [dropInViewController.paymentRequest setDescription:description]; - if (amount) [dropInViewController.paymentRequest setAmount:amount]; dropInViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(userDidCancelPayment)]; @@ -99,6 +96,10 @@ - (instancetype)init dropInViewController.paymentRequest = paymentRequest; } + if (title) [dropInViewController.paymentRequest setSummaryTitle:title]; + if (description) [dropInViewController.paymentRequest setSummaryDescription:description]; + if (amount) [dropInViewController.paymentRequest setDisplayAmount:amount]; + [self.reactRoot presentViewController:navigationController animated:YES completion:nil]; }); }