Skip to content

Commit c7131d5

Browse files
committed
Perform view updates during scroll tracking
1 parent 9e8fd34 commit c7131d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sources/SwiftUI/View+floatingPanelScrollTracking.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ private struct ScrollViewRepresentable<Content>: UIViewControllerRepresentable w
6868
return vc
6969
}
7070

71-
func updateUIViewController(_ uiViewController: ScrollViewHostingController<Content>, context: Context) {
71+
func updateUIViewController(
72+
_ uiViewController: ScrollViewHostingController<Content>,
73+
context: Context
74+
) {
75+
uiViewController.rootView = content()
7276
}
7377

7478
class ScrollViewHostingController<V>: UIHostingController<V> where V: View {

0 commit comments

Comments
 (0)