iphone動畫多張圖片,我有一個UIViewController其中包含16的UIImageView現在我要annimate 4個圖像與核心動畫與CA
任何想法如何做到這一點?
我能夠從動畫一個唯一的下面是我的代碼
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"position"];
anim.fromValue = [NSValue valueWithCGPoint:CGPointMake(100, 100)];
anim.toValue = [NSValue valueWithCGPoint:CGPointMake(200, 200)];
anim.duration = 1.5f;
anim.repeatCount =1;
anim.removedOnCompletion = YES;
anim.autoreverses = YES;
anim.repeatCount = 10;
anim.timingFunction = [CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseIn];
[imgview.layer addAnimation:anim forKey:@"position"];
什麼阻止你做同樣的與其他圖像 - :
您可以通過以下方式來使用它看法? – Till 2012-02-20 11:56:57