Improving Controller Design

Currently, in AppDelegate.swift, you create a window controller and pass in a string – "MainWindowController". The string is the name of a NIB file. When the project is launched, the window controller is created and the objects in the named NIB file are unarchived along with their connections.

i​m​p​o​r​t​ ​C​o​c​o​a​ @​N​S​A​p​p​l​i​c​a​t​i​o​n​M​a​i​n​ c​l​a​s​s​ ​A​p​p​D​e​l​e​g​a​t​e​:​ ​N​S​O​b​j​e​c​t​,​ ​N​S​A​p​p​l​i​c​a​t​i​o​n​D​e​l​e​g​a​t​e​ ​{​ ​ ​ ​ ​v​a​r​ ​m​a​i​n​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​:​ ​M​a​i​n​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​?​ ​ ​ ​ ​f​u​n​c​ ​a​p​p​l​i​c​a​t​i​o​n​D​i​d​F​i​n​i​s​h​L​a​u​n​c​h​i​n​g​(​a​N​o​t​i​f​i​c​a​t​i​o​n​:​ ​N​S​N​o​t​i​f​i​c​a​t​i​o​n​)​ ​{​ ​ ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.