ScrollView Reader & Anchors
Scroll to specific items programmatically.
Jumping to Content
Sometimes you need to scroll to a specific item in code, like a Back to Top button. ScrollViewReader makes that possible. 🎯
Wrap the ScrollView
Place a ScrollViewReader around your ScrollView; it hands you a proxy you use to control scrolling.
ScrollViewReader { proxy in
ScrollView {
Content()
}
}All lessons in this course
- Horizontal & Vertical ScrollView
- LazyVStack & LazyHStack
- Adaptive Grids with LazyVGrid
- ScrollView Reader & Anchors