You can get light or dark variant of a color declared in assets automatically in SwiftUI by switching on your phone theme. If you choose the dark mode on your phone, the color appearance will be Dark Appearance, if Light, then Light Appearance.
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…