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
Cross-platform To-do App in SwiftUI using AWS Infrastructure 🔥
public
–
1 min read
Constantly updated This guide is private and copying it is not allowed. You can publish the link to this page…
What is the @StateObject property wrapper? – SwiftUI
public
–
1 min read
SwiftUI’s @StateObject property wrapper is designed to fill a very specific gap in state management: when you need to…
SceneStorage vs AppStorage - SwiftUI
public
–
1 min read
SceneStorageIn simple words, it saves the state of your app so when the app is killed or switched it comes…