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