ScrollKit icon indicating copy to clipboard operation
ScrollKit copied to clipboard

Update the library for the new SwiftUI scroll capabilities

Open danielsaidi opened this issue 1 year ago • 7 comments

As SwiftUI has added more native scroll capabilities, such as being able to get the scroll offset, the library should be updated to use these native capabilities, instead of relying on the current custom implementations.

Since this involves using features that are only available in iOS 17 and 18 (and corresponding versions on other platforms) this will involve a major version bump.

danielsaidi avatar Jul 21 '24 09:07 danielsaidi

@danielsaidi I tried to use the new onScrollGeometryChange, but I noticed that both solutions do not produce the same result.

Image Image

LACHKAR99ZAKARIA avatar Jan 24 '25 15:01 LACHKAR99ZAKARIA

Hi @LACHKAR99ZAKARIA

Sorry for the late reply.

I am still waiting to find time to look at this.

Does it work if you use the new ScrollViewReader and its proxy?

danielsaidi avatar Feb 10 '25 14:02 danielsaidi

@danielsaidi I just tried it, and it seems to be working. I’ve sent a merge request.

LACHKAR99ZAKARIA avatar Feb 10 '25 14:02 LACHKAR99ZAKARIA

That's awesome! I'll take a look.

danielsaidi avatar Feb 17 '25 08:02 danielsaidi

Thank you @LACHKAR99ZAKARIA - I've merged this and will create a. patch update for it.

danielsaidi avatar Feb 17 '25 08:02 danielsaidi

@LACHKAR99ZAKARIA I unfortunately noticed that this doesn't work. When using this code in the demo app, none of the sticky headers work. I have pushed some concurrency changes to the main branch, in case you want to take another stab at it.

danielsaidi avatar Feb 17 '25 13:02 danielsaidi

Ok @danielsaidi i will try to fix it

LACHKAR99ZAKARIA avatar Feb 18 '25 14:02 LACHKAR99ZAKARIA