2011-12-26 63 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