MDCSwipeToChoose
MDCSwipeToChoose copied to clipboard
Swift code getting <Error>: CGAffineTransformInvert: singular matrix
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.
I came across the same problem,and @dosapati 's method solved it.Thanks :-) :+1:
Thanks @dosapati Fixed it for me too.
Since originalTransform is CATransform3D :
self.mdc_viewState.originalTransform = CATransform3DMakeAffineTransform(CGAffineTransformMake(1, 0, 0, 1, 0, 0));