2012-03-04 219 views

回答

10

巢它的UIView的animateWithDuration包裝的,像這樣完成的變化:

[UIView animateWithDuration:1.00 animations:^{ 
    //animate first! 
    } 
        completion:^(BOOL finished) { 
         [UIView animateWithDuration:1.00 animations:^{ 
         //animate the second time. 
         }]; 
    }]; 

或者只設置一個動畫從它繼續與這個當前狀態:

[UIView animateWithDuration:1.00 
          delay:0.00 
         options:UIViewAnimationOptionBeginFromCurrentState 
        animations:^{ 
         //animate 
        } 
        completion:^(BOOL finished){ 

    }]; 
+0

太棒了!感謝那個漂亮的小解決方案。 – JFS 2013-06-26 20:17:14

0

我總是連鎖我動畫與此:

[self performSelector:@selector(animationDone) withObject:nil afterDelay:1.0];