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

Add a Tab View Controller

Now you will adjust the ViewControl application to display not one but two ImageViewController instances, contained within an NSTabViewController (Figure 30.6).

Figure 30.6  Object diagram for the ViewControl application with the NSTabViewController

Object diagram for the ViewControl application with the NSTabViewController

In AppDelegate.swift, create the second image view controller as well as the tab view controller:

 ​ ​ ​ ​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​)​ ​{​ ​ ​ ​ ​ ​ ​ ​ ​l​e​t​ ​f​l​o​w​V​i​e​w​C​o​n​t​r​o​l​l​e​r​ ​=​ ​I​m​a​g​e​V​i​e​w​C​o​n​t​r​o​l​l​e​r​(​)​ ​ ​ ...

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