我有非常简单的任务,但我无法理解 CATransform3DRotate。我有 3 个高度和宽度相等的 UIImageView,我需要为左右项目设置一些转换以获得下一个结果: https ://dl.dropboxusercontent.com/u/15196617/result.png
原屏: https ://dl.dropboxusercontent.com/u/15196617/original.png
我的消息来源:
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -1.f / self.prevItemImageView.bounds.size.width;
transform = CATransform3DRotate(transform, (CGFloat) -(M_PI / 3.f), 0, 1.f, 0);
self.prevItemImageView.layer.anchorPoint = CGPointMake(1.f, 0.5f);
self.prevItemImageView.layer.transform = transform;
transform = CATransform3DIdentity;
transform.m34 = -1.f / self.nextItemImageView.bounds.size.width;
transform = CATransform3DRotate(transform, (CGFloat) (M_PI / 3.f), 0, 0.5f, 0);
self.nextItemImageView.layer.anchorPoint = CGPointMake(0.f, 0.5f);
self.nextItemImageView.layer.transform = transform;
这不是工作。