title: keyboard is not getting dismissed on UITextField
body: <p>This may sound a newbie question, however I'm new to iOS dev.</p>
  
  <p>Platform : iPad</p>
  
  <p>I have a UITableView with UITextField, let say they are two.
  When pressing on the first one virtual keyboard should appear, but when user tapps on the second UITextField the virtual keyboard should be hidden and data picker view should be displayed.</p>
  
  <p>So here it is, how I did it.</p>
  
  <pre><code>-(void) textFieldDidBeginEditing:(UITextField *)textField {
      if (textField.tag == PICKER_VIEW_TAG) {
          [textField resignFirstResponder];
      } else {
          ...
      }
  }
  
  -(void) textFieldDidEndEditing:(UITextField *)textField
  {
      if (textField.tag != PICKER_VIEW_TAG) {
          ...
      }
  }
  
  - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
  {
      if (textField.tag == PICKER_VIEW_TAG) {
          [self countriesPickerView];
      }
      return YES;
  }
  
  -(BOOL)textFieldShouldReturn:(UITextField *)textField
  {
      if (textField.tag == PICKER_VIEW_TAG) {
          [textField resignFirstResponder];
      } else {
          ... 
      }
      return YES;
  }
  </code></pre>
  
  <p>So now the question, when I click for the first time on the first UITextField it displays keyboard, but when I switch to second one it does not hide it. Why ? and how to solve this ?</p>
  
  <p>UPDATE : The corresponding textField is not getting selected but i.e. the resign takes place, right ? but the keyboard is not hidden ... why this happens ?</p>