Hallo zusammen,
in meinem OSX Project möchte ich von einem ViewController aus auf das Textfeld eines anderen ViewControllers zugreifen:
let vc = self.storyboard.instantiateControllerWithIdentifier("MyVc") as MyViewController
vc.testTextField.stringValue = "Test"
Dies ergibt allerdings folgenden Error:
"fatal error: unexpectedly found nil while unwrapping an Optional value"
Ist das ein Xcode-bug oder mache ich mit Swift etwas falsch?
in meinem OSX Project möchte ich von einem ViewController aus auf das Textfeld eines anderen ViewControllers zugreifen:
let vc = self.storyboard.instantiateControllerWithIdentifier("MyVc") as MyViewController
vc.testTextField.stringValue = "Test"
Dies ergibt allerdings folgenden Error:
"fatal error: unexpectedly found nil while unwrapping an Optional value"
Ist das ein Xcode-bug oder mache ich mit Swift etwas falsch?
XcodeScout