title: Change 'Return' button function to 'Done' in swift in UITextView
body: <p>I would like to get rid of the "return" function of the keyboard while the user is typing, so there are no new lines, so instead I would like the 'return' key to function as 'Done' so it would hide the keyboard.</p>
  
  <p>I am using a UITextView, that is editable, so the user is able to type their post, and post it to the main timeline, but since I have fixed cells, I don't want the user to be able to press 'return' and their post would be out of range of the timeline. </p>
  
  <p>I found this that works with UITextField, but not with UITextView:</p>
  
  <pre><code>func textFieldShouldReturn(textField: UITextField!) -&gt; Bool {
      textField.resignFirstResponder()  //if desired
      return true
  }
  </code></pre>
  
  <p>So I just wanted to know if there is a way to do that in a UITextView, or at least to be able to hide the keyboard if pressed return, instead of creating a new line.</p>