【发布时间】:2011-08-10 16:54:38
【问题描述】:
我想做两个动画,一个接一个:
[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)];
但是有没有一种方法可以传入值(在本例中是一个名为 image6 的 UIIMageView),以便第二个动画与第一个动画出现在同一个对象上?
谢谢!
【问题讨论】:
标签: iphone animation uiimageview