gpt4 book ai didi

ios CATransform3DMakeScale 放大动画

转载 作者:塔克拉玛干 更新时间:2023-11-01 19:11:31 25 4
gpt4 key购买 nike

我有以下动画:

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

我正在缩小 subview 的位置。但我正在尝试做相反的事情。从 subview 大小的 .01% 开始,到 subview 大小的 100%。有谁知道我该怎么做?

最佳答案

这样做:

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
}];

关于ios CATransform3DMakeScale 放大动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12137136/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com