Tl;dr: When starting the Gold challenge, a new button with a show segue to a new view controller throws an exception.
After successfully completing the Silver Challenge, I immediately began the Gold.
- In ‘Item’ class declaration, changed ‘dateCreated’ to be a variable. (Build / run OK.)
- In the ‘DetailViewController’ storyboard interface, added a UIButton to the bottom of the vertical stack view. (Build / run OK.)
- Dragged a new UIViewController onto the storyboard. Ctrl-dragged the new button onto that interface to create a ‘Show’ segue. (Build OK, run ERROR.)
The exception highlights the top of the app delegate class declaration. The error message is:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Homepwner.DetailViewController buttonAction:]: unrecognized selector sent to instance 0x7fc78e00aee0'
I can eliminate the problem by giving my new button an empty @IBAction within DetailViewController. But can’t figure out why this should be necessary.
Any ideas? Thanks!