fermoya / SwiftUIPager

Native Pager in SwiftUI
MIT License
1.29k stars 172 forks source link

[FEAT] Boolean to disable page scrolling #103

Closed luisliz closed 4 years ago

luisliz commented 4 years ago

Is your feature request related to a problem? Please describe. I'm using navigationview while working with the pager and when I'm using a navigation I can scroll past it and I don't want it to.

Describe the solution you'd like A boolean binding variable that I can switch back and forth.

Additional context I modified a version of this and it can be done but I would like it on the official package that way I don't have to use an outdated package. I can create a fork of my proposed solution.

fermoya commented 4 years ago

Hi @luisliz , have you tried using allowsDragging modifier?

Also, when combining gestures (or views that are touchable, like NavigationLink) you might be interested in pagingPriority(.simultaneous).

luisliz commented 4 years ago

Oh, that's exactly what I wanted! I was thinking of something with the disabled boolean.

Thank you very much for the help and for the plugin. I love it!

fermoya commented 4 years ago

Thanks for the kind words.

I’m closing this issue then. Feel free to open a new issue if you find any issue