From c09528d14a6702e172ef5fa09b29553d408101e0 Mon Sep 17 00:00:00 2001 From: alduzy Date: Mon, 8 Jul 2024 10:45:50 +0200 Subject: [PATCH] fix(TVOS): navbar appearance --- ios/RNSScreenStackHeaderConfig.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/RNSScreenStackHeaderConfig.mm b/ios/RNSScreenStackHeaderConfig.mm index a249fb6906..268d9bb575 100644 --- a/ios/RNSScreenStackHeaderConfig.mm +++ b/ios/RNSScreenStackHeaderConfig.mm @@ -589,6 +589,12 @@ + (void)updateViewController:(UIViewController *)vc navitem.standardAppearance = appearance; navitem.compactAppearance = appearance; +// appearance does not apply to the tvOS so we need to use lagacy customization +#if TARGET_OS_TV + navctr.navigationBar.titleTextAttributes = appearance.titleTextAttributes; + navctr.navigationBar.backgroundColor = appearance.backgroundColor; +#endif + UINavigationBarAppearance *scrollEdgeAppearance = [[UINavigationBarAppearance alloc] initWithBarAppearance:appearance]; if (config.largeTitleBackgroundColor != nil) {