Posts

Post marked as solved
7 Replies
0 Views
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)