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

Programmatically Swipe does not perform Animation correctly #84

Open
confile opened this issue May 14, 2015 · 9 comments
Open

Programmatically Swipe does not perform Animation correctly #84

confile opened this issue May 14, 2015 · 9 comments

Comments

@confile
Copy link

confile commented May 14, 2015

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.

@steffimueller
Copy link

+1

@steffimueller
Copy link

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?

@confile
Copy link
Author

confile commented May 21, 2015

@vikmeup Any idea on this issue?

@jeanfw
Copy link

jeanfw commented May 26, 2015

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

@acegreen
Copy link

@jeanfw when I add that line I get the following error:

Assigning to 'CGAffineTransform' (aka 'struct CGAffineTransform') from incompatible type 'CATransform3D' (aka 'struct CATransform3D')

@jeanfw
Copy link

jeanfw commented May 31, 2015

@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.

@acegreen
Copy link

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

@acegreen
Copy link

its actually self.mdc_viewState.originalTransform = self.transform;

without .layer

@rafalio
Copy link

rafalio commented Jul 11, 2015

This was driving me crazy today, thanks for the solution guys, the :head version of the podspec works. @modocache , this issue can be closed.

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

5 participants