阅读背景:

如何使用UITextRange从UITextField获取子字符串

来源:互联网 

So I am using selectedTextRange to get a cursor position from my UITextField. I would like to obtain a substring from the beginning of my TextField text up to the cursor position. How would I go about doing this? I am able to create the UITextRange I want but I don't know how to use this to get the actual substring since substringWithRange seems to only work with NSRange. Any guidance would be greatly appreciated. So I am using selectedTextRange to get a cursor




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: