I would like to NSLog
something when my UITextView is done editing.
I've tried
- (BOOL)textViewShouldEndEditing:(UITextView *)textView
and
- (void)textViewDidEndEditing:(UITextView *)textView
neither worked.
fix:
myTextView.delegate = self;
do you set the delegate of your textview?
fix:
set delegate in .h file like this:
#import <UIKit/UIKit.h>
@interface TextViewController : UIViewController <UITextViewDelegate>
{
UITextView *textView;
}
@property (nonatomic, retain) UITextView *textView;
@end
If you are using UITextField instead make sure to use UITextFieldDelegate and not UITextViewDelegate. And this method instead, that fixed my problems.
- (void)textFieldDidEndEditing:(UITextField *)textField
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