Introducing Combine to iOS without Over"reacting"
summary
Shows how to convert a UIKit rock‑paper‑scissors UI into a reactive pipeline using Combine: uses an @Published property wrapper for player state, wires a publisher through operators to transform Int → HandPosition → systemName → UIImage, fixes the initial-state glitch with dropFirst operator, and retains the chain with an AnyCancellable token. Builds a working small app where tapping sets state and the view updates via publishers and subscribers rather than imperative view controller wiring.
AI-written summary · about
chapters (16)
- 0:00Introduction to Combine
- 0:40UI Kit example setup
- 3:06Imperative UI Kit approach
- 5:14State management refactor
- 6:19Combine pillars overview
- 7:00Publishers and @Published
- 8:24Subscribers and cancellables
- 10:10Fixing initial state issue
- 11:59Operators and transformations
- 13:04Mapping values in pipeline
- 14:49Assigning to UI elements
- 15:53Thread safety with main thread
- 16:13Separating model and view model
- 17:36View model subscription setup
- 19:23View controller simplification
- 20:03Combine future possibilities
related talks
27mGetting Started with Combine
41mIt’s About Time for Combine
32mCombine and your existing delegates and callbacks
30mEvolving Existing Projects With SwiftUI
35mWhy "The Composable Architecture" Matters for iOS App Development
36mData flow in SwiftUI - from @State to @Observable...
29mReactive RubyMotion
10mDeclarative Networking with Combine
