Day143 — path to iOS developer

Jacky Tsang
1 min readFeb 26, 2021

Section 17


  • VHZ Stack layout
  • Highly reusable UI component
  • Cross Platform (iPhone, iPad, Watch)

command + click

  • Embed in HStack/VStack/List
  • Extract SubView

preview custom layout NOT inside a phone bezel

Managing State

SwiftUI uses the @State property wrapper to allow us to modify values inside a struct, which would normally not be allowed because structs are value types.

Mutating Struct


computed properties

return objectID for id to mark it Identifiable

Create array instance



Construct a SwiftUI version of UIKit component


SwiftUI is at its early stage. It depends on apple to provide more features. UIKit has way more layout properties, but I can’t resist declarative ui.