我想根據https://github.com/ECSlidingViewController/ECSlidingViewController建立一些特殊的動畫。如何在iOS中爲ECSlidingViewController構建3D變換?
縮放動畫就像下面的圖片。
只想旋轉通過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);
}
任何幫助,指針或示例代碼片斷將非常感激!
你設法得到它的工作?我試圖做同樣的事情和任何幫助將不勝感激,謝謝 –