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

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.