What NSRange return value do you check for when you call selectedRange on a UITextView that is not currently being edited?
Found the answer:
NSRange range = textView.selectedRange; if (range.location == NSNotFound) { //The textfield was not selected. } else { //There is a valid range. }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With