Created
April 6, 2020 12:41
-
-
Save anupamchugh/6d01f8b51c2b1cfca10e0307da272506 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 | |
import Introspect | |
struct ContentView : View { | |
@State var text = "" | |
var body: some View { | |
VStack { | |
TextField("Enter some text", text: $text) | |
.textFieldStyle(RoundedBorderTextFieldStyle()) | |
.introspectTextField{ | |
textField in | |
textField.becomeFirstResponder() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
best solution possible at the moment