title: resign first responder UITextfield
body: <p>I am so sorry to post this, since it has been asked a million of times, but whenever i try to use one of the solutions, it is either outdated, or won't work with my code. (or maybe i am just doing it wrong)</p>
  <p>i have 5 textfields and a textview, that go into an email, and i am trying to minimise the keyboard when im done, but i dont know how to.</p>
  <p>I also tried to make it go to the next text field, until the last one, but that doesn't need to be done.</p>
  <pre><code>func textView(textView: UITextView, shouldChangeTextInRange: NSRange, replacementText text: String) -&gt; Bool {
      if text == &quot;\n&quot; {
          text6.resignFirstResponder()
          return false
      }
      return true
  }
  
  func textFieldShouldReturn(textField: UITextField) -&gt; Bool {
      if textField == self.text1 {
          self.text2.becomeFirstResponder()
      }
      else if textField == self.text2 {
          self.text3.becomeFirstResponder()
      }
      else if textField == self.text3 {
          self.text4.becomeFirstResponder()
      }
      else if textField == self.text4 {
          self.text5.becomeFirstResponder()
          self.text5.resignFirstResponder();
      }
      
      return true;
  }
  </code></pre>