Je suis en train de mettre en œuvre l'animation suivante:animation de groupe 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
}];
combiné avec un mouvement de la sous-vue. Je sais que dans l'animation de base, vous pouvez combiner des animations, mais comment pouvez-vous faire cela dans l'animation UIView? Est-ce que je peux traduire ce code de l'animation UIView vers l'animation 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
}];
comment peut convertir le code de l'animation de base: yourSubView.transform = CGAffineTransformMakeScale (0,01, 0,01); [UIView animateWithDuration: 0,4 Retard: 0 Options: animations UIViewAnimationOptionCurveEaseOut:^{// durée de changement selon l'exigence // animer à l'identité de transformation (100% échelle) yourSubView.transform = CGAffineTransformIdentity; } achèvement:^(BOOL terminé) { // si vous voulez faire quelque chose une fois l'animation terminée, mettez-la ici }]; – Juan
a modifié la réponse pour afficher l'exemple pour la mise à l'échelle – CSmith