I am running into an issue when trying to return the keyboard in my UITextView when the return button is selected.
Here is my code:
- (void)viewDidLoad {
self.captionArea.delegate = self
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
NSUInteger newLength = [self.captionView.text length] + [text length] - range.length;
return (newLength > 30) ? NO : YES;
if([text isEqualToString:@"\n"])
[textView resignFirstResponder];
return YES;
}
Any ideas why this is giving me issues? The view is just going to a newline, not returning.