~/talk

ICYMI: Enums Are...

Talkat SwiftLeeds 2023 · 2023-10-09..10-10· [swift, creative-coding]
links:none on file
slides:none on file

Builds PocketPerc: Beat Generator using SwiftUI and AVFoundation, showing concrete enum patterns that replace structs/classes for app state and UI. Demonstrates PocketPerc: Beat Generator with toggled samples mixed live, uses enum rawRepresentable, indirect associated values for a surprise fill, CaseIterable stepping helpers to move state forward/back, a generic PlaybackState bridging AVAudioPlayer and audio node frame positions, and even enums conforming to View as view namespaces. Code and app are on GitHub and the live mix works.

AI-written summary · about

  1. 0:00Introduction
  2. 3:35Why Enums
  3. 7:08Basics
  4. 10:49Representing State
  5. 12:00Representing Collection
  6. 21:31Conformance to View
  7. 24:36Mix
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.