阅读背景:

可以检测文本字段是否突出显示文本

来源:互联网 

I was wondering if there was a way to detect if a textField.text is currently highlighted. I am trying to format a phone number, and it works under the exception that the user highlights the field, then starts typing a new number immediately instead of clearing it first. The first ( does not get set because i try to detect if the field is length 0 before adding it. On a text highlight, then keypress, the length is larger than 0 so it doesnt work.I was wondering if there was a way to detect if




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

分享到: