diff --git a/Stripe/UIBarButtonItem+Stripe.m b/Stripe/UIBarButtonItem+Stripe.m index 89b72f47155..2d531711399 100644 --- a/Stripe/UIBarButtonItem+Stripe.m +++ b/Stripe/UIBarButtonItem+Stripe.m @@ -34,6 +34,11 @@ - (void)stp_setTheme:(STPTheme *)theme { NSForegroundColorAttributeName: theme.secondaryForegroundColor, } forState:UIControlStateDisabled]; + [self setTitleTextAttributes:@{ + NSFontAttributeName: self.style == UIBarButtonItemStylePlain ? theme.font : theme.emphasisFont, + NSForegroundColorAttributeName: theme.accentColor, + } + forState:UIControlStateHighlighted]; } @end diff --git a/Stripe/UINavigationBar+Stripe_Theme.m b/Stripe/UINavigationBar+Stripe_Theme.m index da6a5689ec7..a58a5ca9249 100644 --- a/Stripe/UINavigationBar+Stripe_Theme.m +++ b/Stripe/UINavigationBar+Stripe_Theme.m @@ -38,6 +38,40 @@ - (void)setStp_theme:(STPTheme *)theme { NSFontAttributeName: theme.emphasisFont, NSForegroundColorAttributeName: theme.primaryForegroundColor, }; + +#ifdef __IPHONE_13_0 + if (@available(iOS 13.0, *)) { + self.standardAppearance.backgroundColor = theme.secondaryBackgroundColor; + self.standardAppearance.titleTextAttributes = self.titleTextAttributes; + self.standardAppearance.largeTitleTextAttributes = self.largeTitleTextAttributes; + self.standardAppearance.buttonAppearance.normal.titleTextAttributes = @{ + NSFontAttributeName: theme.font, + NSForegroundColorAttributeName: theme.accentColor, + }; + self.standardAppearance.buttonAppearance.highlighted.titleTextAttributes = @{ + NSFontAttributeName: theme.font, + NSForegroundColorAttributeName: theme.accentColor, + }; + self.standardAppearance.buttonAppearance.disabled.titleTextAttributes = @{ + NSFontAttributeName: theme.font, + NSForegroundColorAttributeName: theme.secondaryForegroundColor, + }; + self.standardAppearance.doneButtonAppearance.normal.titleTextAttributes = @{ + NSFontAttributeName: theme.emphasisFont, + NSForegroundColorAttributeName: theme.accentColor, + }; + self.standardAppearance.doneButtonAppearance.highlighted.titleTextAttributes = @{ + NSFontAttributeName: theme.emphasisFont, + NSForegroundColorAttributeName: theme.accentColor, + }; + self.standardAppearance.doneButtonAppearance.disabled.titleTextAttributes = @{ + NSFontAttributeName: theme.emphasisFont, + NSForegroundColorAttributeName: theme.secondaryForegroundColor, + }; + self.scrollEdgeAppearance = self.standardAppearance; + self.compactAppearance = self.standardAppearance; + } +#endif }