diff --git a/Sources/SwiftUI/View+floatingPanelScrollTracking.swift b/Sources/SwiftUI/View+floatingPanelScrollTracking.swift index 5be422e5..f288618d 100644 --- a/Sources/SwiftUI/View+floatingPanelScrollTracking.swift +++ b/Sources/SwiftUI/View+floatingPanelScrollTracking.swift @@ -68,7 +68,11 @@ private struct ScrollViewRepresentable: UIViewControllerRepresentable w return vc } - func updateUIViewController(_ uiViewController: ScrollViewHostingController, context: Context) { + func updateUIViewController( + _ uiViewController: ScrollViewHostingController, + context: Context + ) { + uiViewController.rootView = content() } class ScrollViewHostingController: UIHostingController where V: View {