I'm having some trouble adding CA Layers on top of a NSTextView. I want to be able to add small "bubbles" (like in Xcode) to the text view, so i thought of doing it with core animation. When i enable layer backed mode in the views -awakeFromNib [self wantsLayer:YES], and add a empty CALayer as root layer [self setLayer:rootLayer], the content of the view gets completely destroyed with random garbage

If I set a background color on the root layer, that color shows nicely up. So somehow the textview behind the transparent layer doesnt redraw? Or is it a different problem?
EDIT: Here is an example project producing something similair (at least on 10.8)
Jonas
It turns out that you can't replace the layer of the NSTextView, but only add sub layers. So replacing the line self.layer = rootLayer with [self.layer addSubLayer:rootLayer] works.
Replacing the layer breaks the NSTextView drawing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With