Skip to content

Commit

Permalink
iOS option fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
aroth committed May 26, 2017
1 parent 698aff1 commit 06aee2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ios/RCTBraintree/RCTBraintree.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)];

Expand All @@ -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];
});
}
Expand Down

0 comments on commit 06aee2c

Please sign in to comment.