SimultaneouslyScrollView
SimultaneouslyScrollView copied to clipboard
For small content scroll views, prevent "offscreen" scroll
This is more a question than an issue, I have two lists, one with 20+ rows and another with 5. When scrolling the larger one, it moves the smaller one content out of screen. Was wondering if this could be prevented here, with something like:
scrollViewsStore.allObjects
.filter { $0 != lastScrollingScrollView }
.forEach {
if $0.contentIsBiggerThanScrollOffset(scrollView.contentOffset) {
$0.setContentOffset(scrollView.contentOffset, animated: false)
}
}
Attached a video to show what I mean. Thanks
https://github.com/stonko1994/SimultaneouslyScrollView/assets/4581399/190cd657-1463-4e87-949d-a1f2d2649c2b
I think technically this should be doable as all the information should be available on the UIScrollView 🤔
If you wanna play around with it feel free to open a PR otherwise I will look at it when time allows 🙂