title: How can i clear the text in a text field with a button in swift 3?
body: <p>I want to make a text editor and want a reset button, but I don't know I can reset the <code>UITextField</code>.</p>
  
  <p>Here´s my code:</p>
  
  <pre><code>import Cocoa
  
  class ViewController: NSViewController {
  
  @IBOutlet weak var textField: NSTextField!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view.
  }
  
  @IBAction func Quit(_ sender: Any) {
  
      exit(0)
  
  }
  
  @IBAction func Reset(_ sender: Any) {
  
  
  
  }
  
  override var representedObject: Any? {
      didSet {
      // Update the view, if already loaded.
      }
  }
  
  
  }
  </code></pre>