mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 18:12:44 +02:00
Enhance the VectorHostingController to be presented as a bottom sheet (#6377)
* Enhance the VectorHostingController to be presented as a bottom sheet - Done
This commit is contained in:
@@ -25,12 +25,17 @@ class VectorHostingController: UIHostingController<AnyView> {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
var isNavigationBarHidden: Bool = false
|
||||
var hidesBackTitleWhenPushed: Bool = false
|
||||
private var theme: Theme
|
||||
|
||||
// MARK: Public
|
||||
|
||||
|
||||
/// Wether or not the navigation bar should be hidden. Default `false`
|
||||
var isNavigationBarHidden: Bool = false
|
||||
/// Wether or not the title of the back item should be hidden. Default `false`
|
||||
var hidesBackTitleWhenPushed: Bool = false
|
||||
/// Defines the behaviour of the `VectorHostingController` as a bottom sheet. Default `nil`
|
||||
var bottomSheetPreferences: VectorHostingBottomSheetPreferences?
|
||||
|
||||
/// Whether or not to use the iOS 15 style scroll edge appearance when the controller has a navigation bar.
|
||||
var enableNavigationBarScrollEdgeAppearance = false
|
||||
/// When non-nil, the style will be applied to the status bar.
|
||||
@@ -58,6 +63,8 @@ class VectorHostingController: UIHostingController<AnyView> {
|
||||
|
||||
self.registerThemeServiceDidChangeThemeNotification()
|
||||
self.update(theme: self.theme)
|
||||
|
||||
bottomSheetPreferences?.setup(viewController: self)
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
|
||||
Reference in New Issue
Block a user