SwiftUI’s @StateObject property wrapper is designed to fill a very specific gap in state management: when you need to create a reference type inside one of your views and make sure it stays alive for use in that view and others you share it with.
You might also like
Local Notifications - SwiftUI
public
–
7 min read
This is more like a boilerplate to reuse in projects that covers local notifications for your project. By the end…
Realm + Swift
public
–
3 min read
This is a practical guide on how to use Realm in a SwiftUI project.
Picker / Segmented Control - SwiftUI
public
–
2 min read
Updated for iOS 15
Segmented control
SwiftUI’s Picker can also be used to create segmented controls equivalent to UISegmentedControl…