And that's a wrap
summary
Concrete demo of Swift 5.1 property wrappers: a clamped generic wrapper that enforces 0–1, a user defaults wrapper exposing $key and a projected value API for undo/history, plus a wrapper that makes one property Codable without hand‑writing all Codable methods. Compiler actually generates a private _property and a computed property, injects init right‑hand side into wrapValue, and $property returns projectedValue. Limitations: only one wrapper per property, only for properties, and it’s syntactic sugar relying on the Swift 5.1 compiler.
AI-written summary · about
chapters (11)
- 0:00Intro
- 1:04Imagine you want this
- 2:00Create reusable behavior
- 5:02Introducing Property Wrappers
- 5:55Compiler-Generated Code
- 8:08Generics and Custom Range
- 11:31UserDefaults
- 13:59Accessing the Wrapper
- 17:17Projected Value
- 21:35Property Wrappers and Codable
- 23:49And that's a Wrap!








