2つ目のアニメーションを呼び出した後、1つのアニメーションを永久に続けることはできますか?例えば:UIView 2つのアニメーションが共存する
1) 2脈動オブジェクトを起動する)、その脈動 3ながらそれを移動)は、第2のアニメーションが無限に最初のものを停止している以外は
すべての作品脈動続けます。以下 は、いくつかのサンプルコードです:
//Pulsate **
[UIView animateWithDuration:0.25
delay:0
options: (UIViewAnimationCurveEaseOut | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionRepeat)
animations:^{
CGAffineTransform currentTransform = self.transform;
CGAffineTransform newTransform1 = CGAffineTransformScale(currentTransform, .95, .95);
[self setTransform:newTransform1];
CGAffineTransform newTransform2 = CGAffineTransformScale(currentTransform, 1, 1);
[self setTransform:newTransform2];
}
completion:nil];
//Move **
[UIView animateWithDuration:0.30
delay:0
options: (UIViewAnimationCurveEaseOut | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState)
animations:^{
[[(UIPinchGestureRecognizer*)sender view] setCenter:CGPointMake(myAppDelegate.MCViewReference.center.x-300, myAppDelegate.MCViewReference.center.y)];
}
completion:^(BOOL finished){
}];