I just spent couple of days for trying to figure this out for mac app, but not doing it successfully.
I have first ViewController and second ViewController. Let's say, ViewControllerA(VC-A) and ViewControllerB(VC-B). In Main.storyboard, they are connected by segue with identifier "PromptToUser".
VC-B gets triggered not by button, but if condition during the process.
It is triggered by:
performSegue(withIdentifier: "PromptToUser", sender: self)
in VC-A.
In VC-A, I put the followings so far:
override func prepare(for segue: NSStoryboardSegue, sender: Any?) {
}
In VC-B, so far, I have:
@IBOutlet weak var Login: NSTextField!
@IBOutlet weak var Pass: NSSecureTextField!
VC-B also has a button which I want to make as a trigger to collect information entered by user for above variables and send it back to first view.
I found many similar topics on this in stackoverflow. However, it seems most of them are for iOS, but not for mac app as I could not make UI... and other classes (delegates) and protocols they mentioned to be recognized for Swift 3 environment. I have NSViewController, and NS... not UI...
What would be the best way to approach this for mac app with Swift 3?