Skip to content

Commit 1577beb

Browse files
committed
Update
1 parent c818648 commit 1577beb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/FluidStack/ViewController/FluidViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ open class FluidViewController: FluidGestureHandlingViewController, UINavigation
162162

163163
// MARK: - UIViewController
164164

165-
private var subscription: NSKeyValueObservation?
166-
167165
open override func viewDidLoad() {
168166
super.viewDidLoad()
169167

@@ -178,10 +176,12 @@ open class FluidViewController: FluidGestureHandlingViewController, UINavigation
178176

179177
navigationBar.delegate = self
180178

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-
}
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+
)
185185

186186
view.addSubview(navigationBar)
187187

0 commit comments

Comments
 (0)