For homework this week we were to play with the Mobile Lab Game Kit and to build out a visual metaphor with a possible win state. The organization of the codekit is to encourage us to structure our code with the root/main code with branches / separate swift files. An emphasis on:
- App architecture (data flow) review
- @State, @Binding, “Source of truth”
- Metaphor
- View Composition, Refactoring
I was inspired by a book on our bookshelf The Cloud Collector’s handbook by the Cloud Appreciation Society. Hoping to build a iteration of the codekit where a spaceship or some avatar navigates through different tropospheric clouds:
- cumulonimbus
- cirrocumulus
- altocumulus
- cumulus
Quick References:
- Geometry Reader
- Image / Importing assets
- Type Annotations
- If Else Statements
-
SwiftUI Tutorial: What’s the difference between @State, @ObjectBinding, and @EnvironmentObject?:
-
Why does SwiftUI use structs for views? – Views and Modifiers SwiftUI Tutorial 1/10