Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdc_swipe speed #109

Open
manonthemoon42 opened this issue Dec 4, 2015 · 1 comment
Open

mdc_swipe speed #109

manonthemoon42 opened this issue Dec 4, 2015 · 1 comment

Comments

@manonthemoon42
Copy link

Hi !

Is it possible to add a parameter to mdc_swipe: method ?
Would be great to set an animation speed value for the programmatically swipe.
The current animation is way too fast.

@gerardo-navarro
Copy link

Hi,
could this be done with the method self.frontCardView.mdc_swipeToChooseSetup(swipingOptions: MDCSwipeOptions). Among others, MDCSwipeOptions has a property swipeAnimationDuration which suggests to exactly that.

Unfortunately, I tried the following code (with MDCSwipeToChoose version 0.2.3) with any effect on mdc_swipe speed:

let swipingOptions: MDCSwipeOptions = MDCSwipeOptions()
swipingOptions.swipeCancelledAnimationDuration = 0.5
swipingOptions.swipeAnimationDuration = 2.0
self.frontCardView.mdc_swipeToChooseSetup(swipingOptions)
self.frontCardView.mdc_swipe(MDCSwipeDirection.Right)

Am I missing something? Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants