I have a UITextField that it set up with autocapitalization, correction, etc., those type of modifiers. I also have a custom toolbar above the keyboard with a "done" button for closing the keyboard.
However, I need the user to be able to enter "returns" in their text for formatting purposes. I have the following code which triggers when the "return" key is pressed:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return NO;
}
However, in this case the return key closes the keyboard. Can someone please tell me how to change this code snippet to instead add a blank line to the growing text the user is entering upon clicking "return"?
Thanks!