title: Why doesn't my UITextField, created by code, work inside my tableview Cell?
body: <p>I want two cells to log in (User and password). So I run the app, everything is ok but when I click in the UITextField "playerTextField" the program received this signal: "EXC_BAD_ACCESS". :(</p>
  
  <p>Do u know why? I've tried and read a lot of different ways and it's like this one how I'am closer to get it.</p>
  
  <p>My code:</p>
  
  <p>To disappear the keyboard if the button Next/Done is pushed.</p>
  
  <pre><code>- (BOOL) textFieldShouldReturn:(UITextField *)textField{
      [textField resignFirstResponder];
      return YES;
  }
  </code></pre>
  
  <p>My UITextFields inside the cells.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      static NSString *kCellIdentifier = @"kCellIdentifier";
  
      UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:kCellIdentifier];
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
                                         reuseIdentifier:kCellIdentifier] autorelease];
          cell.accessoryType = UITableViewCellAccessoryNone;
  
  
  
      if ([indexPath section] == 0) {
              playerTextField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, 185, 30)];
              playerTextField.adjustsFontSizeToFitWidth = YES;
              playerTextField.textColor = [UIColor blackColor];
              if ([indexPath row] == 0) {
                  playerTextField.placeholder = @"ejemplo@gmail.com";
                  playerTextField.keyboardType = UIKeyboardTypeEmailAddress;
                  playerTextField.returnKeyType = UIReturnKeyNext;
                  playerTextField.delegate = self;
              }
              else {
                  playerTextField.placeholder = @"Requerida";
                  playerTextField.keyboardType = UIKeyboardTypeDefault;
                  playerTextField.returnKeyType = UIReturnKeyDone;
                  playerTextField.secureTextEntry = YES;
                  playerTextField.delegate = self;
              }       
              playerTextField.backgroundColor = [UIColor whiteColor];
              playerTextField.autocorrectionType = UITextAutocorrectionTypeNo; // no auto correction support
              playerTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; // no auto capitalization support
              playerTextField.textAlignment = UITextAlignmentLeft;
              playerTextField.tag = 0;
  
  
              playerTextField.clearButtonMode = UITextFieldViewModeNever; // no clear 'x' button to the right
              [playerTextField setEnabled: YES];
  
              //cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20.0];
              cell.textLabel.font = [UIFont fontWithName:@"Futura" size:16.0];
              cell.textLabel.textColor = [UIColor darkGrayColor];
              cell.textLabel.shadowOffset = CGSizeMake(0.5, 0.5);
              cell.textLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:10];
  
              [cell.contentView addSubview:playerTextField];
  
              //[playerTextField release];
          }
      }
      if ([indexPath section] == 0) { // Email &amp; Password Section
          if ([indexPath row] == 0) { // Email
              cell.textLabel.text = @"Email";
          }
          else {
              cell.textLabel.text = @"Contraseña";
          }
      }
      else { // Login button section
          cell.textLabel.text = @"Log in";
      }
      return cell;    
  }
  </code></pre>