Contents

scrollTo(id:anchor:)

Scrolls the position of the scroll view to a view with a identity value and anchor you provide.

Declaration

mutating func scrollTo(id: some Hashable & Sendable, anchor: UnitPoint? = nil)

Discussion

Inform the scroll view of which layout it should look for view’s with the identity value you provide using the View/scrollTargetLayout() modifier.