Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
Post marked as solved with 7 replies, 0 views
Replied In
SwiftUI TextField initializer deprecated?
It appears the API was updated but not the documentation, yet. If you command-click on TextField in Xcode it will take you to the SwiftUI file where the init()s are declared. The new init you want ispublic init(_ titleKey: LocalizedStringKey, text: Binding, onEditingChanged: @escaping (Bool) -> Void = { _ in }, onCommit: @escaping () -> Void = {})so for your example change the code toTextField("Search", text: $searchText)