title: How do I make the keyboard go away when the user clicks somewhere else?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2321038/dismiss-keyboard-by-touching-background-of-uitableview">Dismiss keyboard by touching background of UITableView</a>  </p>
  </blockquote>
  
  
  
  <p>How do I make the keyboard go away when the user clicks somewhere else?</p>
  
  <p>Note: I know how to make the keyboard disappear with sending the resignFirstResponder command to the UITextField.  At present the "Done" button is connected to all the correct code to do this and this works.</p>
  
  <p>I have a UITableView with different UITableViewCells, and if the user moves onto another cell I want the keyboard to disappear.</p>
  
  <p>So what events do I also need to include the resignFirstResponder in, for the keyboard to disappear.</p>
  
  <p>Suppose UITableViewCell A has the UITextField, and UITableViewCell B has a button.  If the user presses the button in cell B, then I will need to send the command resignFirstResponder back to the UITextField in cell A.  First of all the button has no idea which cell it should sent the command to, and second even if the button did know which cell to send the command to how would it?</p>