我想其他的以後做兩個動畫,一個:如何在一排相同的UIImageView執行多個動畫
[UIView beginAnimations:@"growImage" context:nil];
[UIView setAnimationDuration:0.2f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDelegate:self];
image6.transform = CGAffineTransformMakeScale(0.9, 0.9);
[UIView commitAnimations];
[UIView beginAnimations:@"shrinkImage" context:nil];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationDelegate:self];
image6.transform = CGAffineTransformMakeScale(0.1, 0.1);
[UIView commitAnimations];
我知道我可以做第二次動畫
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
或通過設置
[UIView setAnimationDidStopSelector:@selector(shrinkImage)];
但是有沒有我可以在值傳遞(在這種情況下,一個UIImageView命名的圖像的方式6),以便第二個動畫出現在與第一個動畫相同的對象上?
謝謝!
完美 - 謝謝!我也必須改變 - (void)animationDidStop:(NSString *)animationID完成:(NSNumber *)完成上下文:(void *)context {to - (void)animationDidStop:(NSString *)animationID完成:(NSNumber *)完成上下文:(UIImageView *)context { – RanLearns