Skip to main content

scroll_view_reader

Function scroll_view_reader 

Source
pub fn scroll_view_reader(
    content: impl Fn(ScrollProxy) -> ViewHandle + 'static,
) -> ViewHandle
Expand description

ScrollViewReader { proxy in content } — a scroll view that can be scrolled from code.

The one view builder in SwiftUI that takes an argument the caller did not supply. It is also escaping — …Vc in the mangling, not …VXE — so both the closure and its context are leaked rather than borrowed: SwiftUI keeps them and calls back long after this returns.