i'm trying to write a little concept app which reads the character stream as the user types in a UITextView, and when a certain word is entered it is replaced (sort of like auto-correction).
i looked into using -
(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
but so far i had no luck. can anyone give me a hint.
greatly appreciated!
david
That is the correct method. Is its object set as the delegate of the UITextView?
UPDATES:
-fixed above to say "UITextView" (I had "UITextField" previously)
-added code example below:
This method implementation goes in the delegate object of the UITextView (e.g. its view controller or app delegate):