I want to resign keyboard from UItextview. How to implement UItextView delegate method programmatically.
If u want that ur keyboard is resigned when click on return then u have to write, implement this method....
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
if([text isEqualToString:@"\n"]) {
[textView resignFirstResponder];
return NO;
}
return YES;
}
Just make it copy and paste....:)
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