当您在当前未被编辑的UITextView上
调用selectedRange时,您检查什么NSRange返回值?
找到答案:
NSRange range = textView.selectedRange;
if (range.location == NSNotFound) {
//The textfield was not selected.
} else {
//There is a valid range.
}
原文链接:https://www.f2er.com/iOS/337302.html