Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoreAnimation Class Error

I am trying to run the code from the answer at the UIView vertical flip animation question, and I keep getting this error in Xcode:

error: Semantic Issue: Assigning to 'CGAffineTransform' (aka 'struct CGAffineTransform') from incompatible type 'CATransform3D' (aka 'struct CATransform3D')

and I don't know how to fix it, and it doesn't seem like it should be happening based on what other people are saying about the code working and such.

The error is on the line of

myView.transform = CATransform3DMakeRotation(M_PI_2,1.0,0.0,0.0);
like image 807
Hank Brekke Avatar asked Oct 08 '11 04:10

Hank Brekke


1 Answers

CATransform3DMakeRotation returns a CATransform3D. But, UIView.transform is a CGAffineTransform, which is not the same. You could try

myview.layer.transform = CATransform3DMakeRotation(...);

CALayer's transform is of type CATransform3D.

like image 96
Colin Avatar answered Oct 03 '22 18:10

Colin