~/talk

Custom Styleable Containers in SwiftUI

Talkat Swift Rockies 2026 · 2026-07-22..07-23· [ios]
slides:none on file

Claims two simple tricks let developers build fully styleable SwiftUI containers: use subviews collection to get a resilient array of child views (handles conditionals and ForEach) and read child preferences with container values so children send tags and labels upward. Uses iOS 18 APIs (available to ~97% of users), makes styles work with property wrappers by conforming the style to dynamic property, and demonstrates a working custom tab view (~150 lines) with grid, menu and overflow behaviors, no AnyView hacks or custom result builders.

AI-written summary · about

  1. 0:00Introduction by host
  2. 1:24Speaker introduction
  3. 2:28What is a container in SwiftUI
  4. 3:35Challenges of custom containers
  5. 6:50iOS 18 container APIs
  6. 9:02Using SubviewsCollection
  7. 10:28Container values explained
  8. 13:21Styling containers
  9. 15:09Dynamic property protocol
  10. 18:44Demo setup
  11. 20:32MyTabView implementation
  12. 23:49Configuration and styling
  13. 25:15Demo of custom tab view
  14. 27:43Summary and resources
~/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.