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:
@I
It seems that the earlier beta versions (which featured Swift) of Xcode had some serious issues with this kind of outlets (as you can see here: http://swiftwtf.tumblr.com/post/88387419568/nstextview). However, since Xcode 6 Beta 6
it works.
textFieldOutlet.textStorage.mutableString.setString("Hello w0rld!")
To handle the String, creating an outlet for the textField
instead of the scrollView
itself is also a better practice.