Jan 10 2017
The incredible invisible window
OSX 10.12, Xcode 8.0 I’m not entirely certain under which circumstances this is useful, but [code language=”plain”]class invisibleWindowController: NSWindowController { override func windowDidLoad() { super.windowDidLoad() self.window?.isOpaque = false self.window?.backgroundColor = NSColor.clear } }[/code] is a thing of beauty. If the view in the window’s contentViewController overrides override func draw(_ dirtyRect: NSRect), the effect is […]
Oct 28 2017
macOS Storyboard Segues
The other day I had what I thought a very simple request: I wanted to replace one viewcontroller with another in the same window. This is something that on iOS (particularly iPhones) happens all the time; but somewhat to my suprise, macOS does not have an obvious out-of-the-box solution for this. This turns out to […]
By Extelligent Cocoa • Application Design, Design Patterns, Interface, Wiki • • Tags: NSStoryboardSegue, NSViewController, NSWindowController, storyboards