Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-beers-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-native-bottom-tabs': patch
---

fix: prevent header showing on iPad when using a custom one
15 changes: 15 additions & 0 deletions packages/react-native-bottom-tabs/ios/TabViewImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ struct TabViewImpl: View {
}
.tag(tabData?.key)
.tabBadge(tabData?.badge)
.hideTabBar(props.tabBarHidden)
.onAppear {
#if !os(macOS)
updateTabBarAppearance(props: props, tabBar: tabBar)
Expand Down Expand Up @@ -351,6 +352,20 @@ extension View {
self
}
}

@ViewBuilder
func hideTabBar(_ flag: Bool) -> some View {
if flag {
if #available(iOS 16.0, *) {
self.toolbar(.hidden, for: .tabBar)
} else {
// We fallback to isHidden on UITabBar
self
}
} else {
self
}
}

// Allows TabView to use unfilled SFSymbols.
// By default they are always filled.
Expand Down
Loading