I found this important remark in the Core Animation programming guide :
The instance of MenuView is set as the layer-hosting view of rootLayer. The order of these two calls is important. By first setting the layer to rootLayer and then setting setWantsLayer: to YES our layer is used rather than the one that the view would create. This is the key difference between layer-hosting views and layer-backed views.
[self setLayer:rootLayer];
[self setWantsLayer:YES];