I'm really confused why this code works fine on 10.6 and 10.7, but on 10.8 there is no animation and the opacity value changes immediately. Self is a NSView subclass.
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.5]
forKey:kCATransactionAnimationDuration];
self.layer.opacity = 1.0;
self.labelFilename.layer.opacity = 1.0;
self.labelDate.layer.opacity = 1.0;
[CATransaction commit];
Conversely this code fails to animate on 10.6 but works fine on 10.7 and 10.8
CABasicAnimation *theAnimation;
theAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
theAnimation.duration = 0.5;
theAnimation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut];
theAnimation.toValue=[NSNumber numberWithFloat:1.0];
theAnimation.removedOnCompletion = NO;
theAnimation.fillMode = kCAFillModeForwards;
[self.layer addAnimation:theAnimation forKey:@"fadeUp"];
[self.labelFilename.layer addAnimation:theAnimation forKey:@"fadeUpName"];
[self.labelDate.layer addAnimation:theAnimation forKey:@"fadeUpDate"];