开发者

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 wor开发者_如何学编程king 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜