nswindowcontroller

Subclassing NSWindowController in Swift and init(windowNibName)

拜拜、爱过 提交于 2019-11-26 20:08:27
问题 I am trying to start a new document based Cocoa project in Swift and want to create a subclass of NSWindowController (as recommended in Apple's guides on document based apps). In ObjC you would make an instance of an NSWindowController subclass sending the initWithWindowNibName: message, which was implemented accordingly, calling the superclasses method. In Swift init(windowNibName) is only available as an convenience initializer, the designated initializer of NSWindowController is init