开发者

How to get last edit point of editing a UITextView?

开发者 https://www.devze.com 2022-12-30 03:15 出处:网络
I am trying to get the last editing point of a UITextView box. I have tried getting the value textView.selectedRange.location,but it always comes开发者_如何学Python out as 2147483647 (which is -1).

I am trying to get the last editing point of a UITextView box.

I have tried getting the value textView.selectedRange.location,but it always comes开发者_如何学Python out as 2147483647 (which is -1).

When should I read this value


You could save the selectedRange in the -textViewShouldEndEditing: method of your delegate, and then use this saved value.

0

精彩评论

暂无评论...
验证码 换一张
取 消