title: How to add Done button to the keyboard?
body: <p>UPDATE:</p>
  
  <p>I also tried implementing UITextViewDelegate delegate and then doing in my controller:</p>
  
  <pre><code>- (BOOL)textViewShouldEndEditing:(UITextView *)textView
  {
      [textView resignFirstResponder];
      return YES;
  }
  </code></pre>
  
  <p>I also set the delegate of the text view to be self (controller view instance).</p>
  
  <p>Clicking the Done button still inserts just a new line :(</p>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <p>What I have done so far. I have implemented a UITextFieldDelegate by my view controller.</p>
  
  <p>I have connected the text view to the view controller via outlet.</p>
  
  <p>Then I did:</p>
  
  <hr>
  
  <pre><code>self.myTextView.delegate = self;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)textField
  {
      [textField resignFirstResponder];
      return YES;
  }
  </code></pre>
  
  <p>But when I click on Done button, it just adds a new line.</p>
  
  <p>So I have a UITextView element on my scene and when a user taps it, keyboard appears and it can be edited.</p>
  
  <p>However, I cannot dismiss the keyboard.</p>
  
  <p>How can I add Done button to the keyboard so it can be dismissed?</p>