Reputation: 814
I can't seem to figure out a way to change the text/string value of an NSTextView with Swift. Does anyone know how to do that? If there is no way to do that, an alternative would simply be to figure out a way to make a text area that someone could scroll through and read. How would I do that? I'm using Xcode 7.1.1, and I'm using Swift 2.1. Thanks!
Upvotes: 1
Views: 394
Reputation: 19782
What have you tried? This works, in a quick test in a Playground:
//: Playground - noun: a place where people can play
import Cocoa;
var t = NSTextView(frame: NSRect(x: 0, y: 0, width: 100, height: 100));
t.string = "Hello";
Upvotes: 1