title: UITableViewCell with TextField and checks input
body: <p>I am currently create a UITableViewCell with a UITextField in it.
  On click of the text field, I want to bring up a number keyboard that I created. And as I type, the textfield should check the input for me; on click of other place, the keypad should be dismissed. </p>
  
  <p>Code:</p>
  
  <pre><code>UITableViewCell *sizeCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"sizeCell"];
  sizeCell.textLabel.text = @"Size";
  UITextField* sizeField = [[UITextField alloc] initWithFrame:CGRectMake(185, 10, 100, 28)];
  sizeField.text = @"0";
  sizeField.textAlignment = UITextAlignmentRight;
  sizeField.textColor = [UIColor colorWithRed:50.0/255.0 green:79.0/255.0 blue:133.0/255.0 alpha:1.0f];
  sizeField.backgroundColor = [UIColor clearColor];
  sizeField.keyboardType = UIKeyboardTypeDecimalPad;
  
  [sizeCell.contentView addSubview:sizeField]; 
  
  rows = [[NSArray arrayWithObjects:switchCell, typeCell, sizeCell, nil] retain];
  </code></pre>
  
  <p>I tried to implement UITextFieldDelegate like:</p>
  
  <pre><code>-(BOOL)textFieldShouldReturn:(UITextField *)textField{
     [sizeField resignFirstResponder];
     return YES;
  }
  </code></pre>
  
  <p>but the keyboard doesn't go away...</p>
  
  <p>How do I validate the input and dismiss the keyboard?</p>