title: Swift: retrieving text from a UITextField in a custom UITableViewCell and putting it in an array
body: <p>I'm making a very simple app where the user enters the number of people in the first Screen.</p>
  <p>In the second screen it generates a number of <code>UITableViewCell</code> based on the number the user entered in the first screen. The <code>UITableViewCell</code> have a <code>UITextField</code> in them and I'm trying to store the data entered in those fields in an array once the user clicks to go to the third screen.</p>
  <p>How can I do that? <br>Thanks in advance!</p>
  <h2>Edit: I'm using the storyboard.</h2>
  <p>Here is what the code that calls for the custom <code>UITableViewCell</code> looks like for my <code>UIViewController</code>:</p>
  <pre><code>func tableView(tableView:UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell{
          
      var cell: EditingCell = tableView.dequeueReusableCellWithIdentifier(&quot;Cell&quot;) as EditingCell
      
      if indexPath.row % 2 == 0{
          cell.backgroundColor = UIColor.purpleColor()
      } else {
          cell.backgroundColor = UIColor.orangeColor()
      }
      
      let person = arrayOfPeople[indexPath.row]
      
      cell.setCell(person.name)
      
              
      return cell
  }
  </code></pre>
  <p>Here is what the code for the <code>UITableViewCell</code> looks like:</p>
  <pre><code>class EditingCell: UITableViewCell{
      
      @IBOutlet weak var nameInput: UITextField!
      
      
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
      }
  
      override func setSelected(selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
  
          // Configure the view for the selected state
      }
      
      
      func setCell(name:String){
          self.nameInput.placeholder = name
      }
  }
  </code></pre>