title: Dismiss The Keyboard - Multiple UITextFields in iOS 7
body: <p>below you'll find my .h &amp; .m files for my primary viewcontroller.  </p>
  
  <p>I have 3 questions.</p>
  
  <p>1.) Because I have multiple uitextfields, do I have to set each with their own resignFirstResponder statement ?  and 2.) where would I do that, in what method ?  3.) Is my syntax right for resigning the first responder ?</p>
  
  <p>Also it would be really nice if I could dismiss the keyboard when the user clicks out of the field NOT on hitting the return key!  </p>
  
  <p>I know this has been asked and answered before, but to be honest with you i'm still a little confused as to what goes where.  </p>
  
  <p>I'm using storyboards, with XCode 5, and iOS 7.  </p>
  
  <p>=============================</p>
  
  <p>.h file</p>
  
  <pre><code>@interface ViewController : UIViewController &lt;UITextFieldDelegate,UITableViewDelegate,UITableViewDataSource&gt;
  
  @property (weak, nonatomic) IBOutlet UITextField *danceDate;
  @property (weak, nonatomic) IBOutlet UITextField *dancePlace;
  @property (weak, nonatomic) IBOutlet UITextField *danceTerminal;
  @property (weak, nonatomic) IBOutlet UITextField *danceGate;
  </code></pre>
  
  <p>.m file</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      [self retrieveFromParse];
  
      self.tableView.dataSource = self;
      self.tableView.delegate = self;
      self.navigationItem.rightBarButtonItem = self.editButtonItem;
  
      // SET DELEGATE HERE
      //
      // if I uncomment 1 of these lines, i'll get an error.
      //
      // _dancePlace.delegate = self; 
      // dancePlace.delegate = self; 
      // dancePlace = self; 
  
  }
  
  - (void)textFieldDidBeginEditing:(UITextField *)textField
  {
  
  }
  
  -(BOOL) textFieldShouldReturn: (UITextField *) textField
  {
      [textField resignFirstResponder];
  
      return YES;
  }
  
  
  -(BOOL) textFieldShouldReturn: (UITextField *) textField
  {
      return YES;
  }
  </code></pre>