How can you make an NSTextView layer backed? I know you can make an NSView layer backed by setting the NSView.wantsLayer property to true. When I do this on an NSTextView the text it normally displays is not visible.
This is my swift (playground) code:
import Cocoa
import QuartzCore
let tv = NSTextView(frame: NSRect(x: 0, y: 0, width: 100, height: 50))
tv.string = "Hello world."
tv.wantsLayer = true
The property tv.layer
returns an NSTextViewBackingLayer, which sounds at least something related to displaying text.
What is going wrong here?
Thanks in advance.