UITextView Delegate shouldChangeTextInRange (or any over) doesn't get called

Posted by justas wza on Stack Overflow See other posts from Stack Overflow or by justas wza
Published on 2010-05-25T06:23:27Z Indexed on 2010/06/12 11:53 UTC
Read the original article Hit count: 468

Hello,

I need to track changes in my UITextView method (actianly for limiting number of lines), but none of UITextViewDelegate methods are being called when editing in UITextView begins. Not even - (void)textViewDidChange:(UITextView *)textView;

I dont know what Im doing wrong

I added UITextViewDelegate method to header file like that:

@interface PirmasViewController : UIViewController <UITextViewDelegate, MFMa......

And I put any methods for tracking changes in my implementation file:

- (void)textViewDidChange:(UITextView *)textView{NSLog(@"something changed");}

- (BOOL)textView:(UITextView *)aTextView shouldChangeTextInRange:(NSRange)aRange replacementText:(NSString*)aText{ NSLog(@"something changed"); return YES; }`

but no rezults.

© Stack Overflow or respective owner

Related posts about uitextview

Related posts about uitextviewdelegate