- (IBAction) textFieldDoneEditing: (id) sender
{
/ / [Sender resignFirstResponder];
}
After connecting this method, comment out the contents inside, why return the keyboard or click to return?
Reply:
You clean about the project and try again, should not be that way. . . . . .
Reply:
An indirect method using proxy
- (BOOL) textView: (UITextView *) textView shouldChangeTextInRange: (NSRange) range replacementText: (NSString *) text
{
if ([text isEqualToString: @ "\ n"]) {/ / Press the return key
/ / Here to hide the keyboard, without any treatment
[TextView resignFirstResponder];
return NO;
}
2 directly with the proxy method
- (BOOL) textFieldShouldReturn: (UITextField *) textField
No comments:
Post a Comment