ChocolateChip WWDC 2019 sample code

I enjoyed watching the demos of the ChocolateChip app used in WWDC 2019 sessions 205 and 235, however not all of the source code was shown in the video, I was wondering if it would be possible for that project to be made available on the session video page? Because I have the following questions:


What is the code for RecipesViewController.swift selectRecipe?

- I was wondering if it performs a segue, also wondering if it selects a table row.


What is the code for RecipesViewController.swift selectedRecipe?

- I was wondering if it calls up to the split view controller to get the currently showing RecipeDetailViewController's recipe or if it simple relies on the table row selection.


What does RecipeNavigationController.swift have in it?

>was wondering if it would be possible for that project to be made available on the session video


Feel free to file a request via the Feedback Assistant, being sure to add your report # to your thread for reference, thanks and good luck.

They appear to use a classical master-Detail scheme.


Usually, you set a segue from the table cell in Master to the detailView and set the right content in prepare for segue.


Hope that helps.

Thanks for the replies.


I submitted FB7498558 which a copy of can be viewed publicly here http://www.openradar.me/radar?id=5062792444903424


Yes they use a segue and the performSegue method can be seen, however interestingly it doesn't set the selectedRecipe so I was wondering how the method selectedRecipe retrieves the current selection if it uses the table view or if it searches the hierarchy to find it back from the detail controller that was segued to. Using table row selection for state is unreliable because setting editing clears the selection. Also they hook up a key command to an action that favourites the selectedRecipe, so I was wondering if that works on the selected row item or on the item showing the detail controller, in which case why doesn't the detail controller be the one handling the action.


Another thing is the selectFirstRecipe method call, it can be seen as the last call in a method and I was wondering it is viewWillAppear which is where I would put it.

ChocolateChip WWDC 2019 sample code
 
 
Q