-
-
Save sturdysturge/82cd9321c8b73145ce4a40c8602dcdb5 to your computer and use it in GitHub Desktop.
RevDoc accentColor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
//Only possible on Mac in Xcode 12 | |
Button("Button") { | |
print("Button pressed") | |
} | |
.accentColor(.red) | |
//Possible on Mac in Xcode 11 | |
Button(action: { | |
print("Button pressed") | |
}) { | |
Text("Button") | |
.foregroundColor(.red) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment