Post

Replies

Boosts

Views

Activity

Reply to I am using tabview more than 5 tabs on sixth tab it showing "More" option I want to hide it
If you have a custom TabView and using a system one for rendering screen content, then you can use the tabViewStyle modifier to hide the more button that showing up on navbar. For example: struct ContentView: View { let tabBarItems = TabBarItem.allCases // A custom enum array including all possible tabs @State var selected: TabBarItem = .home // Selected TabBarItem var body: some View { // ... TabView(selection: $selected) { Group { Text("First Screen") .tag(bottomBarItems[0]) Text("Second Screen") .tag(bottomBarItems[1]) } .toolbar(.hidden, for: .tabBar) // Hide system tabBar } .tabViewStyle(.page(indexDisplayMode: .never)) // @See: https://developer.apple.com/documentation/swiftui/pagetabviewstyle CustomTabBar(bottomBarItems, selected: $selected) // Render your custom TabBar } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23