I have a text view, and when I click, textview starts a new line.
I implemented these methods and added all the delegates
@property (nonatomic, strong) IBOutlet UITextView *textField; -(void)textViewDidEndEditing:(UITextView *)textView
I set the keyboard return key to the attribute handler. I want the key to work on the keyboard to cancel the first responder, it doesn't seem to work.
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if([text isEqualToString:@"\n"]) { [textView resignFirstResponder]; return NO; } return YES;
How can I add both operators so that they work without errors?
source share