I’ve read the postings in this section for this Challenge and it doesn’t seem they follow what the book is asking for. I don’t know if what the book asks for can be done with the current Swift 4.1, but I’d like to try. For those that are following this site, but not reading the book, here is the Challenge:

“In Dice, add a method to ConfigurationWindowController:

presentAsSheetOnWindow(_:completionHandler:).

The method’s parameter should be the window the configuration sheet should be displayed on, and the completion handler will be a closure of type (DieConfiguration?)->(Void). If the user clicks OK, the DieConfiguration will be passed to the completion handler; otherwise it will be nil to signal that nothing changed.

Apparently to encapsulate, I need to move the IBAction function showDieConfiguration: to ConfigurationWindowController.swift? Or at least the parts of it that create the sheet.

Any hints on how to get this done?

Thanks!

// Edit on 5/17/2018

I’ve been searching online for what felt like weeks to learn how to write the code for this challenge. I did find a page with a solution. I was hoping to find “how to do it” not how it was done, but you can’t unsee what you see. I won’t post the solution here (it took two web sites, one for the solution, and another search on how to get it to work in Swift 4.1). If anyone wants the web sites, or wants the solution just posted here, I can do that.