mirror of
https://github.com/Ferrite-iOS/Ferrite.git
synced 2026-03-11 17:45:40 +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
|
||||
}
|
||||
.introspectNavigationController { navigationController in
|
||||
if #available(iOS 16, *) {
|
||||
navigationController.viewControllers.first?.navigationItem.preferredSearchBarPlacement = .stacked
|
||||
}
|
||||
|
||||
navigationController.navigationBar.prefersLargeTitles = true
|
||||
navigationController.navigationBar.sizeToFit()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue