want to know ever time while pressing on keyboard back button during textfield editing ios
In OTP, there are four textfields were used. Moving the cursor to the previous textfield while pressing on keyboard back button? To detect the backspace event in a UITextField, first you need to set up a delegate for the UITextField and set it to self. class ViewController: UIViewController,UITextFieldDelegate self.textField.delegate = self Then you use the delegate method below to detect if a backspace was pressed func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { func textField(_ textField: UITextField,