0

in older ios version i can click to textView to choose position to edit text if i input wrong text.

After IOS 15 i need to longClick and swipe to choose cursor position. Now i want to fallback the way choosing cursor to older version, can someone help me how to do it?

I can add click to textView like this:

messageInputBar.inputTextView.addGestureRecognizer(UITapGestureRecognizer(target:self, action: #selector(handleKeyboardWillShow(gesture:))))

But i can not know position to move cursor

Thanks in advance.

famfamfam
  • 396
  • 3
  • 8
  • 31
  • Does this answer your question? [Getting and Setting Cursor Position of UITextField and UITextView in Swift](https://stackoverflow.com/questions/34922331/getting-and-setting-cursor-position-of-uitextfield-and-uitextview-in-swift) – Tad Jan 02 '22 at 21:33
  • i read this post, this does not provide click position on textView and focus the cursor to this position programmatically like ios did sir – famfamfam Jan 03 '22 at 14:58

0 Answers0