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);
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With