进行了个测试
向上移动
CABasicAnimation * animation = [AnimationUtil translate3d:CATransform3DMakeTranslation(0, -100, 100) dur:1 direction:1 repeatCount:0];
[_mView.layer addAnimation:animation forKey:nil];
_mView.layer.transform =CATransform3DMakeTranslation(0, -100, 0);
向下移动CABasicAnimation * animation2 = [AnimationUtil translate3d:CATransform3DMakeTranslation(0, 100, 0) dur:1 direction:1 repeatCount:0];
[_mView.layer addAnimation:animation2 forKey:nil];
_mView.layer.transform =CATransform3DMakeTranslation(0, 100, 0);
presentationlayer只在第一次动画后就origin位置就不变了即使设置了.layer.transform,modallayer一开始就变了(modalayer在那里按钮的监听就在modallayer对应的位置)layer也是随着layer.transform改变而改变 ,如果把layer.transform注释掉就和presentationlayer一起随着动画动而改变值
用CATransform3D实现的动画会非常连续