Skip to content

Commit 3fd408d

Browse files
authored
Update handling navigation bar height (#188)
1 parent b1efd75 commit 3fd408d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/FluidStack/ViewController/FluidViewController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ open class FluidViewController: FluidGestureHandlingViewController, UINavigation
161161
}
162162

163163
// MARK: - UIViewController
164-
164+
165165
open override func viewDidLoad() {
166166
super.viewDidLoad()
167167

@@ -175,6 +175,13 @@ open class FluidViewController: FluidGestureHandlingViewController, UINavigation
175175
let navigationBar = navigation.navigationBarClass.init()
176176

177177
navigationBar.delegate = self
178+
179+
subscriptions.append(
180+
navigationBar.observe(\.bounds, options: [.initial, .old, .new]) { [weak self] view, _ in
181+
guard let self else { return }
182+
self.additionalSafeAreaInsets.top = view.frame.height
183+
}
184+
)
178185

179186
view.addSubview(navigationBar)
180187

0 commit comments

Comments
 (0)