ios CATransform3DMakeScale扩展动画

Jua*_*uan 3 xcode animation subview scaletransform ios

我有以下动画:

CATransform3D scaleTransform = CATransform3DMakeScale(0.1,0.1, 1.0);
scaleAnimation.toValue = [NSValue valueWithCATransform3D:scaleTransform];
keyframeAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];;
Run Code Online (Sandbox Code Playgroud)

在哪里我缩小子视图.但我正试图做相反的事情.从子视图大小的0.01%开始,并转到子视图大小的100%.有谁知道我该怎么做?

Par*_*iya 6

做这个:

yourSubView.transform = CGAffineTransformMakeScale(0.01, 0.01);
[UIView animateWithDuration:0.4 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 
//change time duration according to requirement
// animate it to the identity transform (100% scale)
yourSubView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished){
// if you want to do something once the animation finishes, put it here
}];
Run Code Online (Sandbox Code Playgroud)