title: How to dismiss keyboard for UITextView
body: <p>The following triggers when the Done button is clicked on the keyboard.  It goes into the conditional and returns false.  However, the keyboard remains on the screen.</p>
  
  <pre><code>class MyViewController: UIViewController, UITextViewDelegate{
  
  
  func textView(textView: UITextView!, shouldChangeTextInRange: NSRange, replacementText: NSString!) -&gt; Bool {
      if(replacementText.isEqualToString("\n")) {
          textBox.resignFirstResponder()
          return false
      }
      return true
  }
  </code></pre>
  
  <p>textBox is a delegate for the view.  I have connected this through Interface Builder.  Any ideas why it isn't dismissing the keyboard?</p>