Skip to content

Commit c818648

Browse files
committed
Patch
1 parent b1efd75 commit c818648

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/FluidStack/ViewController/FluidViewController.swift

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

163163
// MARK: - UIViewController
164+
165+
private var subscription: NSKeyValueObservation?
164166

165167
open override func viewDidLoad() {
166168
super.viewDidLoad()
@@ -175,6 +177,11 @@ open class FluidViewController: FluidGestureHandlingViewController, UINavigation
175177
let navigationBar = navigation.navigationBarClass.init()
176178

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

179186
view.addSubview(navigationBar)
180187

0 commit comments

Comments
 (0)