December 2018
Intermediate to advanced
414 pages
10h 19m
English
Imagine you're building an interactive cookbook. Cookbooks are often confusing as all of the steps may be on the same page, without images, and you believe that a full page with videos and so on will provide a better experience.
We can break down the cookbook into multiple recipes—each recipe has an ingredient list and multiple steps to accomplish in order, only one step after the other. We don't really need to focus right now on the ingredient list, but more on how we can use delegation in order to easily abstract away the realization of a recipe:
class Step: Equatable { let instructions: String = "" weak var delegate: StepDelegate?}
Step is merely a simple abstraction over a recipe step:
class Recipe { let steps: ...
Read now
Unlock full access