我必须为 UIButtons 数组执行收缩和扩展动画。对于单个 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);}];
我怎样才能为 UIbuttons 数组实现相同的效果。