Either of these animations work by themselves but when combined in an animation group, nothing appears. (I comment out one or the other in following code).
What am I doing wrong?
if (![annotationView.layer animationForKey:@"alphaAndScaleAnimationGroup"])
{
CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
scaleAnimation.toValue = [NSNumber numberWithFloat:1.0f];
CABasicAnimation *alphaAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
alphaAnimation.fromValue = [NSNumber numberWithFloat:0.10f];
alphaAnimation.toValue = [NSNumber numberWithFloat:0.0f];
CAAnimationGroup *group = [CAAnimationGroup animation];
group.duration = 2;
group.repeatCount = INFINITY;
group.autoreverses = NO;
group.removedOnCompletion = NO;
group.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[group setAnimations:[NSArray arrayWithObjects: scaleAnimation, alphaAnimation, nil]];
[annotationView.layer addAnimation:group forKey:@"alphaAndScaleAnimationGroup"];
}