yeah that's correct the character does not become the part of textfied.text until you return true that function
if you want to get all of character in ‘textfield shouldChangeCharacters’textfield shouldChangeCharacters try this one:
let oldText = textField.text! let r = Range(range, in: oldText) let text = oldText.replacingCharacters(in: r, with: string)