0
我试图实现以下的动画:的UIView组动画
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
}];
与子视图的一些运动相结合。我知道核心动画你可以结合动画,但你怎么能在UIView动画中做到这一点?
我可以将此代码从UIView动画转换为Core动画吗?
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
}];
代码如何可以转换到核心动画:yourSubView.transform = CGAffineTransformMakeScale(0.01,0.01); [UIView的animateWithDuration:0.4延迟:0选项:UIViewAnimationOptionCurveEaseOut动画:^ {根据需要 //变化持续时间 //它动画的恒等变换(100%比例) yourSubView.transform = CGAffineTransformIdentity; }完成:^(BOOL完成){ //如果您想在动画完成后执行某些操作,请将其放在这里 }]; – Juan
编辑答案显示缩放的例子 – CSmith