我必須爲UIButton數組執行縮小和展開動畫。對於單一的UIButton我做這樣的...如何動畫(縮小和展開)到UIButton數組
UIButton *button = [self.destinationButtonsArray objectAtIndex:0];
[UIView beginAnimations:@"shrink" context:(__bridge void *)(button)];
[UIView animateWithDuration:0.7f delay:0 options:UIViewAnimationOptionAutoreverse | UIViewAnimationCurveEaseInOut | UIViewAnimationOptionRepeat | UIViewAnimationOptionAllowUserInteraction animations:^{
[UIView setAnimationRepeatCount:3];
CGAffineTransform t = CGAffineTransformMakeScale(1.2f, 1.2f);
button.transform = t;
} completion:^(BOOL finished) {
button.transform = CGAffineTransformMakeScale(1.0f, 1.0f);}];
我怎樣才能實現UIbutons的陣列相同的效果。
當您將代碼放入for循環時,您是否看到問題? – Wain