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

Present the Sheet

When the user clicks the Configure Die menu item, the sheet should be presented in order to configure the currently selected DieView.

How will you determine which DieView to change? Because DieView accepts first responder, you can easily determine which, if any die view has the focus (and blue highlight) by checking the window’s firstResponder.

Open MainWindowController.swift and fill out the stub for showDieConfiguration(_:).

/​/​ ​M​A​R​K​ ​-​ ​A​c​t​i​o​n​s​

v​a​r​ ​c​o​n​f​i​g​u​r​a​t​i​o​n​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​:​ ​C​o​n​f​i​g​u​r​a​t​i​o​n​W​i​n​d​o​w​C​o​n​t​r​o​l​l​e​r​?​ @​I​B​A​c​t​i​o​n​ ​f​u​n​c​ ​s​h​o​w​D​i​e​C​o​n​f​i​g​u​r​a​t​i​o​n​(​s​e​n​d​e​r​:​ ​A​n​y​O​b​j​e​c​t​?​)​ ​{​ ​ ​ ​ ...

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