UPDATE:
I also tried implementing the UITextViewDelegate delegate, and then executed in my controller:
- (BOOL)textViewShouldEndEditing:(UITextView *)textView { [textView resignFirstResponder]; return YES; }
I also assigned a delegate to the text view self (controller instance).
Pressing the "Finish" button still inserts only a new line: (
UPDATE:
What I have done so far. I executed UITextFieldDelegate using my view controller.
I connected the text view to the view controller through the output.
Then I did:
self.myTextView.delegate = self;
and
- (BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return YES; }
But when I click Finish, it just adds a new line.
So, I have a UITextView element in my scene, and when the user picks it up, a keyboard appears and can be edited.
However, I cannot remove the keyboard.
How can I add a Done button to the keyboard so that it can be rejected?
ios objective-c iphone xcode programmatically-created
Richard Knop Apr 09 2018-12-12T00: 00Z
source share