Post

Replies

Boosts

Views

Activity

Reply to SwiftUI 4, IOS 16
And I forgot to mention why I was avoiding to use switch if statement. Simple reason, does not hold view state, so if you scroll down and you will switch to the next tab and than back, your view does not remember where did you end before you switched to another tab.
Sep ’22
Reply to SwiftUI 4, IOS 16
I tried this, but origin tabView is still visible. Native tab bar is not visible if im stayed from 1 to 4 tabs, when I click on 5th tab, < More button appear on the NavigationBar, on 6th tab I see underlying ... button under my custom tab bar. When I go back to tab where is List or ScrollView I see material background. TabView(selection: $currentTab) {         Favorites()           .tag(Tab.Favorite)                   Recents()           .tag(Tab.CallLogs)                   Contacts(searchText: $searchText)           .tag(Tab.Contacts)                   Keypad()           .tag(Tab.Keypad)           .header(             headerModel: headerModel,             conversationModel: conversationModel,             loginModel: loginModel,             colorScheme: colorScheme,             defaultButtons: true,             leadingHeaderContent: {},             trailingHeaderContent: {},             additionalHeaderContent: {}           )                   VoiceMail()           .tag(Tab.VoiceMail)                   if intranet {           Intranet(isScanning: $isScanning, webViewStateModel: webViewStateModel)             .tag(Tab.Intranet)         }       }       .safeAreaInset(edge: .bottom) {         if #available(iOS 16, *) {           TabBar()             .toolbar(.hidden, for: .tabBar)         } else {           TabBar()         }       } For iOS < 16 was enough this to dont have native look of TabBar with < More button included in TabBar and NavigationBar init() { UITabBar.appearance().isHidden = true }
Sep ’22