我想构建一个基于https://github.com/ECSlidingViewController/ECSlidingViewController的特殊动画。
缩放动画如下图所示。
我只想通过 PI / 4 旋转主视图控制器。如下图所示。
我曾尝试像下面的代码一样进行 EndState 转换,但它不起作用。
- (void)topViewAnchorRightEndState:(UIView *)topView anchoredFrame:(CGRect)anchoredFrame {
CATransform3D toViewRotationPerspectiveTrans = CATransform3DIdentity;
toViewRotationPerspectiveTrans.m34 = -0.003;
toViewRotationPerspectiveTrans = CATransform3DRotate(toViewRotationPerspectiveTrans, M_PI_4, 0.0f, -1.0f, 0.0f);
topView.layer.transform = toViewRotationPerspectiveTrans;
topView.layer.position = CGPointMake(anchoredFrame.origin.x + ((topView.layer.bounds.size.width * MEZoomAnimationScaleFactor) / 2), topView.layer.position.y);
}
任何帮助、指针或示例代码片段将不胜感激!