I\'m using shouldChangeCharactersInRange as a way of using on-the-fly type search.
However I\'m having a problem, shouldChangeCharactersInRange get
This function is called when changes are made but UI is not updated and waiting for your choice
Take a look at returned bool value
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool
true - it means that iOS accept changes(text, caret...)false - it means that you are responsible for all this stuff