Using CATransform3D to create flip animation

感情迁移 提交于 2019-12-06 03:21:51

You don't say what you mean by "it's just not the same as UIViewAnimationTransitionFlipFromRight". Are you seeing perspective? I've found that I need to specify the .m34 field first prior to calling the CATransform3D functions in order to get perspective. Set that right after you declare your transform and before your call to CATransform3DMakeRotation.

I'm not entirely sure, but perhaps you should probably reset the previewLayer.transform to CATransform3DIdentity when you complete the animation? That might be why you are seeing the strange reverse actions the second time you run it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!