- Add an NSTextView (either manually or through the interface builder).
- Set drawsBackground = false
- Add subview directly to NSTextView
Subview will not be visible.
However, if I add another subtitle to the same level as, for example, NSScrollView, the first preview will appear.
Here is an example project for Xcode: https://www.dropbox.com/s/inz30bq9xzdw0g5/TestTextSubviews.zip?dl=0
In the source code, if you uncomment the following lines:
// let bg2 = BgView (frame: NSRect (x: 105, y: 105, width: 100, height: 100)) //window.contentView.addSubview(bg2)
then the add-in will first appear.
source share