I want to define theme colors in SwiftUI.
For example, in the default "Watch" app, all letters are orange.
Please tell me how to specify the theme color of the application in this way.
I want to define theme colors in SwiftUI.
For example, in the default "Watch" app, all letters are orange.
Please tell me how to specify the theme color of the application in this way.
Code Block swift import SwiftUI struct MyButton: View { private let action: () -> Void private let title: String init(action: @escaping () -> Void, title: String) { self.action = action self.title = title } var body: some View { Button(action: self.action) { Text(self.title) .foregroundColor(.orange) } } } struct MyView: View { var body: some View { MyButton(action: { // your action }, title: "Hello world") } }