Ricky Brown
Ricky Brown

Reputation: 654

How to toggle the UITabBar translucent property with NativeScript?

I want my TabView bar to be the same color as my layout. There was a flat boolean added to NS to make this possible with the ActionBar, but how can I achieve this with my tab bar as well? If I set the tab-background-color property to black, I want it to actually be black, not dark grey due to the translucent property explained here: https://developer.apple.com/documentation/uikit/uitabbar/1623458-translucent?language=objc

I've found many posts/articles about solving this for the ActionBar but haven't seen anything about tabs yet

Upvotes: 0

Views: 156

Answers (1)

Manoj
Manoj

Reputation: 21908

Try this on loaded event of TabView

onTabViewLoaded(args) {
   const tabView = args.object;
   if (tabView.ios) {
     tabView.ios.tabBar.translucent = true; // false;       
   }
}

Upvotes: 0

Related Questions