Follow along at https://www.hackingwithswift.com/100/swiftui/80.
This day covers Part Two of Project 16
in the 100 Days of SwiftUI Challenge. (Project 16 files can be found in the directory for Part One.)
It focuses on several specific topics:
- Understanding Swift’s Result type
- Manually publishing ObservableObject changes
- Controlling image interpolation in SwiftUI
Being able to return declarative, deterministic, strongly-typed information about the success or failure of an operation is a beautiful -- and useful -- concept -- even more so when dealing with asynchronous operations.
It's no coincidence that Swift's Result
type is basically what everyone was rolling on their own well before its introduction in Swift 5 😆.