- (void)viewWillAppear:(BOOL)animated
{
[superviewWillAppear:animated];
for(inti =0; i <3; i ++) {
UIButton*tagBtn = [self.viewviewWithTag:100+i];
[selfaddScaleAnimationTo:tagBtn];
}
}
- (void)addScaleAnimationTo:(UIView*)animationView
{
[animationView.layer removeAnimationForKey:@"scale"];
CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnimation.fromValue=@1.f;
scaleAnimation.toValue=@1.1f;
scaleAnimation.autoreverses=YES;
scaleAnimation.repeatCount=HUGE_VALF;
scaleAnimation.duration=2.f;
[animationView.layeraddAnimation:scaleAnimationforKey:@"scale"];
}