I'm new to iOS development.
I have written header file following like this
@interface TextView : UITextView <UITextViewDelegate, UIPopoverControllerDelegate>
in TextView.h.
The implementation file code is following :
- (BOOL)textViewShouldBeginEditing:(TextView *)textView
{
ZWLog(@"called should begin edit");
return YES;
}
- (void)textViewDidBeginEditing:(TextView *)textView
{
ZWLog(@"called did begin edit");
}
- (BOOL)textViewShouldEndEditing:(TextView *)textView
{
ZWLog(@"called should end editing");
return YES;
}
- (void)textViewDidEndEditing:(TextView *)textView
{
ZWLog(@"view did end edit");
return YES;
}
- (BOOL)textView:(TextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
//my own code
return YES;
}
- (void)textViewDidChange:(TextView *)textView
{
//my own code
}
When i start typing a character in UITextView
, I got response from
textViewShouldBeginEditing
.textViewDidBeginEditing
.shouldChangeTextInRange
.textViewDidChange
.But I didn't get any response from textViewDidEndEditing
or textViewShouldEndEditing
. Do you have any idea why these are not getting called?
Thanks for your answers.
textViewDidEndEditing is called when textfield resigns its first responder, when the keyboard disappears.
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