0

This is a macOSX Cocoa Swift question, not iOS.

I have two view controllers [ViewController] & [SecondView].

The [SecondView] has a button with a string value attached. I want to be able to push the button and have the string value populate in my NSTextField on my [ViewController].

Example: (SecondView)

@IBAction func repair(_ sender: Any) {
        solution.stringValue += "Repair needed"

BUTTON PRESSED - pass string to [ViewController

@IBOutlet weak var solution: NSTextField!
Brenny
  • 45
  • 4

0 Answers0