how to insert text at any cursor position in uitextview?

前端 未结 4 955
走了就别回头了
走了就别回头了 2021-02-13 01:42

i want to implement Code by which i can start to insert text at any position of cursor in UITextView in iphone sdk

any idea? thank you in advance..

i refereed th

4条回答
  •  隐瞒了意图╮
    2021-02-13 02:09

    The simplest way (but it won't replace selected text) is to use the insertText: method:

    [textView insertText:@"some text you want to insert"];
    

    UITextView conforms to UITextInput which itself conforms to UIKeyInput.

提交回复
热议问题