Created
June 24, 2023 01:35
-
-
Save dfeinzimer/cdab7b30280f7a9b003eaacc877c5c47 to your computer and use it in GitHub Desktop.
Xcode 15 Beta 2 Broken Breaks View.focused(_:)
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 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