I have 2 View Controller Scenes. Scene2 holds settings that will be used in scene1. Scene2 is accessed by menu item and its presented as show.
Now the issue is that the settings used in scene2 will not be used by scene1 unless the latter is refreshed.
I did try to trigger a viewDidLoad() of scene1 when the settings were saved at scene2 but it crashed.
class replaceSegue: NSStoryboardSegue {
override func perform() {
if let fromViewController = sourceController as? NSViewController {
if let toViewController = destinationController as? NSViewController {
// no animation.
fromViewController.view.window?.contentViewController = toViewController
}
}
}
}