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

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.