NSWindowController/NSViewController “Presentation” setting in Storyboard

The presentation style affects “Show” segues. Possibly it affects other segues too, but I only tested a Show segue. I tested on OS X 10.10.5 (Yosemite) with Xcode 7.1.1. If a window controller’s presentation style is “Multiple” (the default), then a Show segue to the window controller always loads a new instance of the window … Read more

NSViewController User Interface State Restoration

To achieve aforementioned effect let’s create NSSearchField and a custom class named RestoredWindow containing just one property: import Cocoa class RestoredWindow: NSWindow { override class var restorableStateKeyPaths: [String] { return [“self.contentViewController.searchField.stringValue”] } } Assign this custom class to Window Controller in Identity Inspector. Next, let’s bind searchField.stringValue property to ViewController in Value section of Bindings … Read more