As we used UITextField in Swift
textField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
And TextField in SwiftUI provide
TextField("", text: $input, onEditingChanged: { changed in
print("Changed")
self.output = "You are typing: " + self.input
}, onCommit: {
print("Commited")
self.output = "You typed: " + self.input
})
Changed will print on begin edit and Commited will print on return key press.
Now i m typing ABC
So now the question is
if i want to call any function or process on press of A, what steps i need to do for that ?