Skip to content
academia.sh

Unit 02 of 03

Layout and Collections

Constraint-based layout with constraints, priorities and ambiguity resolution, stack views that reduce the number of constraints, table views with cell reuse and a data source, collection views with a flexible layout definition, the delegate pattern for handing off responsibility, and low-level visual control with drawing and layer animation.

Published Updated

Lessons

  1. 01 Constraint-Based Layout A measurement of how a constraint constant that changes in the model but is never written to the on-screen constraint counts as stale, and a constraint that is never set up counts as missing. 13 min read
  2. 02 Stack Views A measurement of how a badge removed from the model but not hidden in the stack view counts as leftover, how it counts as matching once the hiding is written, and how hiding is built into the model as a visibility field. 13 min read
  3. 03 Table Views A measurement of how a note of the previous row left in a reused cell counts as leftover, how a row whose model changed but was not reloaded counts as stale, and how which cell comes back is not measured. 13 min read
  4. 04 Collection Views A measurement of how an item added to the data source but not announced to the collection view counts as missing, how it counts as matching once a snapshot is applied, and how the position calculation is not measured. 13 min read
  5. 05 The Delegate Pattern A measurement of how a weakly held delegate that is not wired or has been released drops the call and leaves the screen stale, and how not being wired and a method that writes nothing give the same result. 13 min read
  6. 06 Drawing and Layer Animation A measurement of how a ring drawn with draw(_:) stays stale when no redraw is requested, how a value returns to its old state when the model layer is not written in a layer animation, and how the duration is not measured. 13 min read

Start typing to search.

↑↓ ↵ Esc navigate · open · close