Skip to content

Commit

Permalink
Fixes Title Color (#398)
Browse files Browse the repository at this point in the history
* Setting the uiCustomization.navigationBarTitleTextColor is independent of the color set by BTDropInUICustomization(colorScheme:). This can cause issues if the navigationBarTitleTextColor is set similar to the color provided in the colorScheme. We should instead use the default primaryTextColor to set this textColor value instead of using the navigationBarTitleTextColor since the background for this is set separately.
  • Loading branch information
jaxdesmarais authored Mar 1, 2023
1 parent 08e8c79 commit 266eaba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Braintree iOS Drop-in SDK - Release Notes

## unreleased
* Fixes bug where title color on `BTPaymentSelectionViewController` is set as the default `primaryColor` for the `BTDropInUICustomization(colorScheme:)` (fixes #397)

## 9.8.0 (2023-01-10)
* Add explicit error handling for case when `BTDropInResult.mostRecentPaymentMethod(for:)` method fails to fetch any recent payment methods.
* Add `BTDropInErrorTypeNoRecentPaymentMethods` error code.
Expand Down
1 change: 1 addition & 0 deletions Sources/BraintreeDropIn/BTPaymentSelectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ - (void)viewDidLoad {
action:@selector(cancelButtonPressed:)];

UILabel *titleLabel = [BTUIKAppearance styledNavigationTitleLabel];
titleLabel.textColor = [BTUIKAppearance sharedInstance].primaryTextColor;
titleLabel.text = BTDropInLocalizedString(SELECT_PAYMENT_LABEL);
titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.numberOfLines = 2;
Expand Down

0 comments on commit 266eaba

Please sign in to comment.