NSTextField transparent background
The secret is setting ALL THREE of these properties on the NSTextField
...
myTextField.bezeled = NO;
myTextField.editable = NO;
myTextField.drawsBackground = NO;
There is a property in the .xib file, on the interface builder window for the text field, under attribute inspector
- Check the Display Draws Background
- Select a background color. Select clear color for transparent background.
As of 10.12 you can just do:
let label = NSTextField(labelWithString: "HELLO")