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 {
101
101
}
102
102
. tag ( tabData? . key)
103
103
. tabBadge ( tabData? . badge)
104
+ . hideTabBar ( props. tabBarHidden)
104
105
. onAppear {
105
106
#if !os(macOS)
106
107
updateTabBarAppearance ( props: props, tabBar: tabBar)
@@ -351,6 +352,20 @@ extension View {
351
352
self
352
353
}
353
354
}
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
+ }
354
369
355
370
// Allows TabView to use unfilled SFSymbols.
356
371
// By default they are always filled.
You can’t perform that action at this time.
0 commit comments