-
-
Save sturdysturge/b54f0dc8cc527ef5e2d3fc3391033df3 to your computer and use it in GitHub Desktop.
This file contains 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 { | |
@State var text = "Example text" | |
var body: some View { | |
VStack { | |
TextField("", text: $text) | |
.textFieldStyle(RoundedBorderTextFieldStyle()) | |
Button("Print") { print(text) } | |
} | |
.padding() | |
.onAppear { | |
if runningForPreviews { | |
console.isVisible = true | |
console.fontSize = 15 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment