From 86ff418166d9963e7380aa69e7ae57a1abc24eb5 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Tue, 7 Sep 2021 12:20:13 -0700 Subject: [PATCH] fix(ios): actionitem coloring with 15+ --- packages/core/ui/action-bar/index.ios.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/core/ui/action-bar/index.ios.ts b/packages/core/ui/action-bar/index.ios.ts index 5e76f9cce..ce1747e27 100644 --- a/packages/core/ui/action-bar/index.ios.ts +++ b/packages/core/ui/action-bar/index.ios.ts @@ -357,19 +357,14 @@ export class ActionBar extends ActionBarBase { return; } if (color) { + const titleTextColor = NSDictionary.dictionaryWithObjectForKey(color.ios, NSForegroundColorAttributeName); if (majorVersion >= 15) { const appearance = navBar.standardAppearance ?? UINavigationBarAppearance.new(); - appearance.titleTextAttributes = NSDictionary.dictionaryWithObjectForKey(color.ios, NSForegroundColorAttributeName); - } else { - // legacy styling - navBar.titleTextAttributes = { - [NSForegroundColorAttributeName]: color.ios, - }; - navBar.largeTitleTextAttributes = { - [NSForegroundColorAttributeName]: color.ios, - }; - navBar.tintColor = color.ios; + appearance.titleTextAttributes = titleTextColor; } + navBar.titleTextAttributes = titleTextColor; + navBar.largeTitleTextAttributes = titleTextColor; + navBar.tintColor = color.ios; } else { navBar.titleTextAttributes = null; navBar.largeTitleTextAttributes = null;