From 27492219e6f1903b4c3f744cfe9a5569ccc6a600 Mon Sep 17 00:00:00 2001 From: Janos Hrubos <33330538+janoshrubos@users.noreply.github.com> Date: Thu, 17 Feb 2022 04:15:06 +0100 Subject: [PATCH] fix(ios): tabview background color with appearance api in iOS 15+ (#9617) --- packages/core/ui/tab-view/index.ios.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/core/ui/tab-view/index.ios.ts b/packages/core/ui/tab-view/index.ios.ts index 82741cb9a..8e03dfb20 100644 --- a/packages/core/ui/tab-view/index.ios.ts +++ b/packages/core/ui/tab-view/index.ios.ts @@ -571,7 +571,15 @@ export class TabView extends TabViewBase { return this._ios.tabBar.barTintColor; } [tabBackgroundColorProperty.setNative](value: UIColor | Color) { - this._ios.tabBar.barTintColor = value instanceof Color ? value.ios : value; + if (majorVersion >= 15) { + let appearance = UITabBarAppearance.new(); + appearance.backgroundColor = value instanceof Color ? value.ios : value; + + this._ios.tabBar.scrollEdgeAppearance = appearance; + this._ios.tabBar.standardAppearance = appearance; + } else { + this._ios.tabBar.barTintColor = value instanceof Color ? value.ios : value; + } } [selectedTabTextColorProperty.getDefault](): UIColor {