Fix the search tab's layout now that its built against os27

This commit is contained in:
Stefan Ceriu
2026-10-01 13:46:20 +03:00
parent b65e8f6a7c
commit 38312b7473
2 changed files with 10 additions and 0 deletions
@@ -409,6 +409,7 @@ private struct NavigationTabCoordinatorView<Tag: Hashable>: View {
}
}
.backportTabBarMinimizeBehaviorOnScrollDown()
.backportTabViewSearchActivationOnSearchTabSelection()
.introspect(.tabView, on: .supportedVersions, customize: configureAppearance)
}
@@ -20,6 +20,15 @@ extension View {
}
}
/// iOS 27 only detaches the search tab and docks its field at the bottom when selecting the tab activates search.
@ViewBuilder func backportTabViewSearchActivationOnSearchTabSelection() -> some View {
if #available(iOS 27.0, *) {
tabViewSearchActivation(.searchTabSelection)
} else {
self
}
}
@ViewBuilder
func backportSafeAreaBar(edge: VerticalEdge,
alignment: HorizontalAlignment = .center,