title: Resign keyboard on 'Done' button of keyboard
body: <p>I want to resign keyboard on click of 'Done' button on keyboard. How can i do this? I have following code =></p>
  
  <pre><code>textView.returnKeyType = UIReturnKeyDone;
  </code></pre>
  
  <p>I have this code for limiting number of characters in textview =></p>
  
  <pre><code>    - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range  replacementText:(NSString *)text
  {
  
     if(range.length &gt; text.length)
      {
          return YES;
      }
  
      else if([[textView text] length]  &gt;= MAX_LENGTH_TEXTVIEW &amp;&amp; range.length == 0)
      {
          [textView resignFirstResponder];
          return NO;
  
      }
  
      return YES;
  } 
  </code></pre>
  
  <p>How can i resign keyboard on clicking "Done" button of keyboard? If i click on Done , it's not resigning instead it is going to next line (i.e \n ). Is there any delegate method for "Done" method or so? i am not getting method for "Done" from apple documentation. 
  plz help me ....thanks in advance....</p>