O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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​)​ ​{​ ​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required