mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): tabview background color with appearance api in iOS 15+ (#9617)
This commit is contained in:
committed by
Nathan Walker
parent
aa1c631e6f
commit
27492219e6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user