2011-12-26 65 views
0

我有五个图像,我需要的是动画不同在屏幕上。我有不同的动画代码,但他们使用图像序列创建动画..或者他们动画单个图像。请帮助同时动画多个图像

谢谢你的兴趣@Rob和@Aadhira。这里是我的代码进行直线运动一个形象..我怎样才能在一个曲线

if(isAnimate) { 
    NSLog(@"+30,+15"); 
    [UIView beginAnimations: @"moveView" context: nil]; 
    [UIView setAnimationDelegate: self]; 
    [UIView setAnimationDuration: 0.5]; 
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut]; 
    searchLight1.frame = CGRectMake(searchLight1.frame.origin.x+30, searchLight1.frame.origin.y + 15, searchLight1.frame.size.width, searchLight1.frame.size.height); 
    [UIView commitAnimations]; 
    isAnimate = NO; 
} 
else { 
    NSLog(@"-30,-15"); 
    [UIView beginAnimations: @"moveView" context: nil]; 
    [UIView setAnimationDelegate: self]; 
    [UIView setAnimationDuration: 0.5]; 
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut]; 
    searchLight1.frame = CGRectMake(searchLight1.frame.origin.x-30, searchLight1.frame.origin.y -15, searchLight1.frame.size.width, searchLight1.frame.size.height);  
    [UIView commitAnimations]; 
    isAnimate = YES; 
} 
+0

如果你想要一个真正的答案,你需要更具体地说明你想要做什么。但是阅读Core Animation或观看关于Core Aimation的WWDC视频可能会让你开始。 – 2011-12-26 09:01:20

回答

0

这一切都取决于你想要什么样的动画和你有什么代码制作动画。如果你发布,那会更好。

无论如何,你知道如何动画单个图像。然后开始在5个不同的块中对5个图像进行动画处理。

+0

为了您的利益,谢谢您的Rob和Aadhira。这是我的代码,线性移动一个图像..我怎样才能在曲线动画 – iosDeveloper 2011-12-26 10:42:55