Scroll to Index in SwiftUI

The scroll view reader’s content view builder receives a ScrollViewProxyinstance; A proxy value that supports programmatic scrolling of the scrollable views within a view hierarchy. with the use of proxy’s to perform scrollTo(index)scrolling.

ScrollViewProxyscans all scroll views contained by the proxy for the first with a child view with identifier id, and then scrolls to that view.

Lets jump to Coding.

Visit Now

Tags: index SwiftUI