4

I am trying to position cursor after label subview in a UITextView

I can position cursor when there is some text in UITextView using

How to set the position of the cursor in UITextView

However, if UITextView.text is empty or nil, it stays at the beginning

Is there a way for me to position cursor when there is no text?

I am not sure if I am requirement make sense but thats something I really want for last 10 hours.

I am trying to position cursor after label subview in a UITextView

What I want is:

  • User types in TextView
  • TableView is displayed with content filtered by text in TextView
  • User select a cell in TableView
  • I create a label with the cell content and add as subview to TextView
  • I reset the textView.text = empty
  • User types again in TextView and above steps repeat.

  • The behavior is implemented by iMessage when we try to select contacts.

If you could suggest an alternative.

Community
  • 1
  • 1
GJain
  • 4,643
  • 3
  • 35
  • 79

0 Answers0