I have a TabView with a TabViewCustomization var, with customizationIDs set for all tabs. I have one tab set to .defaultVisibility(.hidden, for: .tabBar, .sidebar). This works as expected; initially, that tab isn't visible in either the tabBar or sidebar; with the sidebar open, I can click Edit and toggle the visibility. So far, so good.
Is there a way that I can programmatically change the visibility? For example, folks with the Admin role should see the tab by default, while those with the User role shouldn't.
If this is possible, can I hide the Edit button on the sidebar so the visibility can only be changed programmatically?
Post
Replies
Boosts
Views
Activity
I have a SwiftUO view containing a TabView with .tabViewStyle(.sidebarAdaptable). It works nicely, save that the sidebar defaults to visible/open. Can I set the default to closed/hidden until the user clicks the sidebar icon in the tabbar?