I was having the same problem with this example, but the above workaround did not do it for me (on 10.6.2).
I tried now to work it out by myself and I found that, as you said, the height of the reflection and the highlight layer remain zero despite the fact that they’re constrained to the superlayer’s height. And when the highlight layer is added as sublayer to a menu layer, it causes said menu layer’s height to become zero too.
Now I found that this can be prevented by initially setting the reflection layer’s height:
/* in -(CALayer*)highlightLayer */
[reflectionLayer setValue:[NSNumber numberWithFloat:43.0f] forKeyPath:@"frame.size.height"];
/* 43 is the height of a menu layer */
Now there are two things I don’t understand about this problem:
1. Why is the height of the reflection and highlight layers not set to the correct value (I mean, we added constraints for that, so it should)?
2. And why does the sublayer even influence the superlayer’s height? I thought that the layout manager determines the sublayers size depending on the superlayer’s size (if the relationship is set to be between superlayer and sublayer) and not the other way around.