title: resignFirstResponder OR - (IBAction) doneButtonOnKeyboardPressed: (id)sender
body: <p>I was just wondering which approach is better to hide keyboard in iphone application </p>
  
  <p>1> Implement </p>
  
  <pre><code>- (IBAction) doneButtonOnKeyboardPressed: (id)sender
  {
  
  }
  </code></pre>
  
  <p>Method on Textfield 's Did End On Exit Event </p>
  
  <p>OR </p>
  
  <p>In Textfield implement this </p>
  
  <pre><code>-(BOOL)textFieldShouldReturn:(UITextField *)theTextField {
  [txtName resignFirstResponder];
  return YES;
  }
  </code></pre>
  
  <p>Which Option is better to choose in which situation...? Any one Option has advantage over other...?</p>