mirror of
https://github.com/Ferrite-iOS/Ferrite.git
synced 2026-04-21 08:52:00 +00:00
CustomScopeBar: Fix search bar placement
iOS 16 has a new search bar placement value which applies the searchbar in the top-right corner with iPads. Searchable does this automatically, but SwiftUIx's modifier needs this fix. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
d504369e98
commit
618041714d
1 changed files with 4 additions and 0 deletions
|
|
@ -51,6 +51,10 @@ struct CustomScopeBarModifier<V: View>: ViewModifier {
|
||||||
self.hostingController = hostingController
|
self.hostingController = hostingController
|
||||||
}
|
}
|
||||||
.introspectNavigationController { navigationController in
|
.introspectNavigationController { navigationController in
|
||||||
|
if #available(iOS 16, *) {
|
||||||
|
navigationController.viewControllers.first?.navigationItem.preferredSearchBarPlacement = .stacked
|
||||||
|
}
|
||||||
|
|
||||||
navigationController.navigationBar.prefersLargeTitles = true
|
navigationController.navigationBar.prefersLargeTitles = true
|
||||||
navigationController.navigationBar.sizeToFit()
|
navigationController.navigationBar.sizeToFit()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue