fermoya / SwiftUIPager

Native Pager in SwiftUI
MIT License
1.27k stars 168 forks source link

Improve pagination behavior when the Digital Crown rotates #268

Closed andriy-appuchino closed 2 years ago

andriy-appuchino commented 2 years ago

Now it works as it should. The only thing I don't like is that the "scroll" indicator doesn't show the actual size of the content. Feel free to refactor my code and put everything on the shelves as it should be. I didn't delve into this project so I did it dirty just to get it to work.

fermoya commented 2 years ago

Thanks for your contribution. There a couple of things that are wrong here. I'll try to summarise:

I see now that the offset reported by the digitalCrown updates to a round number based on the stride. I've made some changes to my implementation, will make a new beta shortly

andriy-appuchino commented 2 years ago

I'm glad that it became clear to you how to implement it, I think you will definitely do better, I'm looking forward to the release.