Detecting selection change on a UITextView?
UITextView
adopts the UITextInput
protocol. That protocol includes a required selectedTextRange
read/write property. That is the property you want to respond to changes of.
While you could observe that property, the simplest approach is to override the -setSelectedTextRange:
method in your subclass and perform whatever additional behaviours you need in there. (You may or may not want to confirm that the range is actually changing, depending on your particular design.)