Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created July 4, 2022 23:13
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 sturdysturge/2983e291134fa7299f1e47a29322ad14 to your computer and use it in GitHub Desktop.
Save sturdysturge/2983e291134fa7299f1e47a29322ad14 to your computer and use it in GitHub Desktop.
import SwiftUI
@available(iOS 16.0, *)
struct ContentView: View {
@State var focused = false
@State var text = ""
var body: some View {
Form {
Toggle("Focused", isOn: $focused)
FocusableTextField(text: $text, focusedBinding: $focused)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment