File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
packages/react-native-bottom-tabs/ios Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' react-native-bottom-tabs ' : patch
3+ ---
4+
5+ fix: prevent header showing on iPad when using a custom one
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ struct TabViewImpl: View {
101101 }
102102 . tag ( tabData? . key)
103103 . tabBadge ( tabData? . badge)
104+ . hideTabBar ( props. tabBarHidden)
104105 . onAppear {
105106#if !os(macOS)
106107 updateTabBarAppearance ( props: props, tabBar: tabBar)
@@ -351,6 +352,20 @@ extension View {
351352 self
352353 }
353354 }
355+
356+ @ViewBuilder
357+ func hideTabBar( _ flag: Bool ) -> some View {
358+ if flag {
359+ if #available( iOS 16 . 0 , * ) {
360+ self . toolbar ( . hidden, for: . tabBar)
361+ } else {
362+ // We fallback to isHidden on UITabBar
363+ self
364+ }
365+ } else {
366+ self
367+ }
368+ }
354369
355370 // Allows TabView to use unfilled SFSymbols.
356371 // By default they are always filled.
You can’t perform that action at this time.
0 commit comments