Table of Contents


Building Custom Views with SwiftUI - Friday

Session materials: https://developer.apple.com/videos/play/wwdc2019/237/

Checking out the code in this session is highly suggested to understand different cases

Layout Procedure

  1. Parent proposes a size for child
  2. Child chooses its own size
    • Depending on the UI they choose their own dimensions, be it fixed width height, aspect ratio or intrinsic textfield
  3. Parent places child in parent’s coordinate space
  4. SwiftUI rounds coordinates to nearest pixel

How Stacks Work

Defining a New Vertical Alignment


Graphics in SwiftUI