supported versions (#1848)

This commit is contained in:
Mauro
2023-10-03 10:10:38 +02:00
committed by GitHub
parent 325ac63d66
commit 7124f24d7c
15 changed files with 96 additions and 17 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ extension View {
/// This modifier may be moved into Compound once styles for the various configuration options have been defined.
func searchableConfiguration(hidesNavigationBar: Bool = true,
showsCancelButton: Bool = true) -> some View {
introspect(.navigationStack, on: .iOS(.v16), scope: .ancestor) { navigationController in
introspect(.navigationStack, on: .supportedVersions, scope: .ancestor) { navigationController in
guard let searchController = navigationController.navigationBar.topItem?.searchController else { return }
searchController.hidesNavigationBarDuringPresentation = hidesNavigationBar
searchController.automaticallyShowsCancelButton = showsCancelButton