Skip to content

Instantly share code, notes, and snippets.

@dfeinzimer
Created June 24, 2023 01:35
Show Gist options
  • Save dfeinzimer/cdab7b30280f7a9b003eaacc877c5c47 to your computer and use it in GitHub Desktop.
Save dfeinzimer/cdab7b30280f7a9b003eaacc877c5c47 to your computer and use it in GitHub Desktop.
Xcode 15 Beta 2 Broken Breaks View.focused(_:)
import SwiftUI
struct ContentView: View {
@State private var text = ""
@FocusState var isFocused: Bool
var body: some View {
ScrollView {
VStack {
TextField("Test", text: $text)
.textFieldStyle(.roundedBorder)
.focused($isFocused)
Text("Text Field Is Focused: \(isFocused.description)")
// isFocused does not update when built with Xcode 15 Beta 2
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment