title: How to get value of uiTextField created programmatically in a uiTableView?
body: <p>I'm a beginner in <code>iOS</code> and I try to get the value of my uiTextField that I created programmatically.</p>
  
  <p>So my problem is that I create a form in an UITableViewController with a .json file. I have created my form, but I don't know how I can get the different values.</p>
  
  <p>In my cellForRowAtIndexPath I created my different elements (I have textFields, textFields with picker and uiswitch). When the user have finished to fill out the form, he click on a "save" button and it is here that I want to get my values.</p>
  
  <p>If someone can help me and put some code for explain .... :) Thanks.</p>
  
  <p>some of my code :</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  </code></pre>
  
  <p>{</p>
  
  <pre><code>static NSString *CellIdentifier = @"Cell";
  
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  if (cell == nil) {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
  }
  NSString *cellValue = [self getItemName:indexPath.section and:indexPath.row];
  cell.textLabel.text = cellValue;
  cell.selectionStyle = UITableViewCellSelectionStyleNone;
  
  NSString *itemType=[self getItemType:indexPath.section and:indexPath.row];
  NSLog(@"%@",itemType);
  
  if ([itemType isEqualToString:@"text"]) {
      UITextField *Reference = [self createTextField];
      [cell.contentView addSubview:Reference];
  }else if ([itemType isEqualToString:@"checkbox"]) {
      UIView *checkbox = [self createCheckbox:indexPath.section and:indexPath.row];
      [cell.contentView addSubview:checkbox];
  }else if ([itemType isEqualToString:@"picker"]) {
      UITextField *Reference = [self createPicker:indexPath.section and:indexPath.row];
      [cell.contentView addSubview:Reference];
  }else if ([itemType isEqualToString:@"datePicker"]) {
      UITextField *Reference = [self createDatePicker];
      [cell.contentView addSubview:Reference];
  }
  return cell;
  }
  </code></pre>
  
  <p>it is here that i create dynamically the elements. For example an uixtField :</p>
  
  <pre><code>-(UITextField*)createTextField{
  UITextField *Reference = [[UITextField alloc] initWithFrame:CGRectMake(200 , 10, 200, 40)];
  Reference.layer.borderColor=[[UIColor blackColor]CGColor];
  Reference.layer.borderWidth=1.0f;
  
  Reference.textAlignment=NSTextAlignmentCenter;
  Reference.tag=_tag;
  _tag++;
  return Reference;
  }
  </code></pre>
  
  <p><a href="http://hpics.li/04b98ca" rel="nofollow">http://hpics.li/04b98ca</a>
  here it is an example of that i obtained with my dynamical generation.</p>