nachonavarro / Pages

📖 A lightweight, paging view solution for SwiftUI
MIT License
556 stars 53 forks source link

Make animation when changing pages externally optional #16

Open koraktor opened 4 years ago

koraktor commented 4 years ago

I know this has been added recently (#8, 9642f78f17aaf8ced40ed28aadf8e9652bc3457b), but for my use case it works best when animations are disabled.

For some context I‘m changing page contents and page index on swiping, effectively creating an possibly infinite number of pages. Currently, the animation of the real swipe and the implicit one by changing the page index causes a slight flickering.

It would be great to have both possibilities and even better a dynamic way of switching this programmatically.

nachonavarro commented 4 years ago

Hey @koraktor this is an excellent idea. I'm a bit busy these few weeks, but if you create a pull request I can review it and merge it back :) Otherwise I'll get to it once I have time.