MDCSwipeToChoose
MDCSwipeToChoose copied to clipboard
Programmatically Swipe does not perform Animation correctly
In the SwiftLikedOrNope sample when you click the buttons to swipe programmatically the swipe animation is not performed. You do not see the "liked" or "nope" and the card does not rotate. It just vanishes.
Could you please fix that.
+1
It only works when you first drag the card by hand a little bit.
This should be fixed. @modocache Do you have any idea for a workaround?
@vikmeup Any idea on this issue?
I had a similar issue, with a console error: <Error>: CGAffineTransformInvert: singular matrix.
My error was due to the originalTransform
not being set at setup, here: https://github.com/modocache/MDCSwipeToChoose/blob/v0.2.3/MDCSwipeToChoose/Public/Views/UIView+MDCSwipeToChoose.m#L42
This has since been fixed on master: https://github.com/modocache/MDCSwipeToChoose/blob/master/MDCSwipeToChoose/Public/Views/UIView+MDCSwipeToChoose.m#L42
... but was not available in the podspec version. Until the podspec is updated, I work around by changing my Podfile
to:
pod 'MDCSwipeToChoose', :head
@jeanfw when I add that line I get the following error:
Assigning to 'CGAffineTransform' (aka 'struct CGAffineTransform') from incompatible type 'CATransform3D' (aka 'struct CATransform3D')
@acegreen Yes I also had the same error when just adding the line, but ultimately went for updating the whole POD, and that worked for me.
Thanks for the feedback. I made too many changes to update my pod. Not sure how thats handled as I'm new to this whole pod thing
its actually self.mdc_viewState.originalTransform = self.transform;
without .layer
This was driving me crazy today, thanks for the solution guys, the :head version of the podspec works. @modocache , this issue can be closed.