Just started to learn Swift and created a little macOS app in which I want to use a NSScrollView to display an attributed String. I’ve tried:
NSScrollView
@I
@IBOutlet weak var scrollView: NSScrollView!
The documentView of the NSScrollView is an NSTextView, so in Swift you can use the following:
documentView
NSTextView
let textView : NSTextView? = scrollView?.documentView as? NSTextView textView?.string = text