Hi, So Im trying to get something working, I think ive actually tried it a few times before on other projects and always gave up.
Would like to get a horizontal scrollview cell / card to sort of snap to place when it has moved onto the screen to stop the scrollview drifting. To give it a bit more of a pagestyle tabview feeling. (If that makes sense!)
The card is big enough that only one fits on the screen, so in my head it would make sense to call scrollTo to the cells id - with onAppear of the cell, but that doesn't seem to work, and does some odd things.
Maybe Im thinking about it all wrong and wondering if anyone has a solution?
edit: So I discovered why my onAppear wasn't working correctly - as I was using an HStack instead of a lazyHStack, and I didn't know that unlike List, scrollViews call onAppear for all elements at once.
So anyway the scrollTo works as it should - but far too sensitive - jumps to the next cell, in a very jerky manner on the first hint of scrolling.
I might just knock this on the head and give up, I wanted to have it to include a nice rotation3DEffect I had, but just seems not worth the hassle. Have switched over to page tabview.