Quantcast
Channel: How to know when text is pasted into a UITextView? - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by joseph.hainline for How to know when text is pasted into a UITextView?

$
0
0

Your UITextView will call its UITextViewDelegate method

 - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text

if a delegate has been set up. This gets called both when a character is typed on the keyboard, and when text is pasted into the text view. The text pasted in is the replacementText argument.

See http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextViewDelegate_Protocol/Reference/UITextViewDelegate.html#//apple_ref/occ/intf/UITextViewDelegate


Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>