Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anupamchugh/6d01f8b51c2b1cfca10e0307da272506 to your computer and use it in GitHub Desktop.
Save anupamchugh/6d01f8b51c2b1cfca10e0307da272506 to your computer and use it in GitHub Desktop.
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()
}
}
}
}
@satelite3131
Copy link

best solution possible at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment