MDCSwipeToChoose icon indicating copy to clipboard operation
MDCSwipeToChoose copied to clipboard

mdc_swipe speed

Open manonthemoon42 opened this issue 10 years ago • 1 comments

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.

manonthemoon42 avatar Dec 04 '15 04:12 manonthemoon42

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

gerardo-navarro avatar Feb 05 '16 09:02 gerardo-navarro