MDCSwipeToChoose icon indicating copy to clipboard operation
MDCSwipeToChoose copied to clipboard

Swift code getting <Error>: CGAffineTransformInvert: singular matrix

Open dosapati opened this issue 10 years ago • 3 comments

While using Swift code If any card is clicked by choosing the buttons instead of Pan gesture - the animation is not showing up.

In Xcode console we see this error.

SwiftLikedOrNope[3704] <Error>: CGAffineTransformInvert: singular matrix

Tried to fix this by initializing originalTransform in UIView+MDCSwipeToChoose.m

self.mdc_viewState.originalTransform = CGAffineTransformMake(1, 0, 0, 1, 0, 0);

Donno is this the right way or not, comment or suggest a better solution. If our approach is right, let me know if you want me to make a pull request and check in the code.

dosapati avatar Apr 25 '15 10:04 dosapati

I came across the same problem,and @dosapati 's method solved it.Thanks :-) :+1:

wang9262 avatar May 08 '15 02:05 wang9262

Thanks @dosapati Fixed it for me too.

ghost avatar Jun 01 '15 11:06 ghost

Since originalTransform is CATransform3D :

self.mdc_viewState.originalTransform = CATransform3DMakeAffineTransform(CGAffineTransformMake(1, 0, 0, 1, 0, 0));

arsonik avatar Jun 04 '15 08:06 arsonik