SwiftUI, Chapter 1. The Oracle Method
Studying a black box, and counting the invisible.
Studying a black box, and counting the invisible.
You will be able to say, in one sentence, what a view is and what it is not.
You will be able to say what a cell is, and the difference between a cell you set from outside and a cell that is computed.
You will be able to explain why a change is announced in two steps, a cheap warning first and a careful check later, and why the warning is allowed to be wrong in one direction only.
First, you will be able to explain where state actually lives, given that the view that declares it is thrown away and rebuilt all the time.
First, you will be able to explain the environment as a dictionary of values attached to a place in the tree, say what a key with a default is, and say which setter wins when two of them disagree.
First, you will be able to say the three steps of the conversation in your own words: the parent proposes a size, the child chooses its own size, and the parent places the child.
First, you will be able to say in plain words what the model says a stack does when it is offered some space, step by step, using only the words first, second, third and so on.
First, you will be able to say why a text has no single size, hand trace how the book's model fills lines with words, and say what a text reports when it is offered too little height.
What a Core Animation layer is, why ten labels are eleven of them, and what happens when you move, fade or change something.
You will be able to say, in plain words, what changes at once when you animate, and what changes over time.
First, you will be able to explain, in plain words, where a spring's overshoot comes from, using a weight, a spring and a pot of honey, and you will be able to write down the one equation that governs it.
First, you will be able to state a seven step order of questions, and say for each step which chapter of this book holds the rules that answer it.