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
Reply to Unable to connect Xcode 15 to iPhone (Error: developer disk image could not be mounted)
For me, it was caused by Charles Proxy—quitting it fixed it. I’ve also seen it happen with a VPN.
Replies
Boosts
Views
Activity
Dec ’24
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:
Replies
Boosts
Views
Activity
Mar ’23