I\'ve been experimenting with UITextField and how to work with it\'s cursor position. I\'ve found a number of relation Objective-C answers, as in
in my case I had to use DispatchQueue:
func textViewDidBeginEditing(_ textView: UITextView) {
DispatchQueue.main.async{
textField.selectedTextRange = ...
}
}
nothing else from this and other threads worked.
PS: I double checked which thread did textViewDidBeginEditing was running on, and it was main thread, as all UI should run on, so not sure why that little delay using main.asynch worked.