SwiftKickMobile / SwiftUIMaterialTabs

Material 3-style tabs and Sticky Headers rolled into one SwiftUI library
MIT License
61 stars 9 forks source link

How to scroll MaterialTabScroll progammatically? #19

Open J6ey opened 1 month ago

J6ey commented 1 month ago

Since it's a ScrollView wrapper I tried using ScrollViewReader's scrollTo but that didn't do much. Anything we can use?

wtmoose commented 1 month ago

scrollPosition() is supported. There's an initializer where you provide a binding for the wrapper's scrollPosition() modifier. Then you modify the binding when you want to manipulate the scroll position.