title: Use selected UIPicker row as text for custom UITableViewCell UILabel SWIFT
body: <p>I have been banging against this for days now, trying a number of different approaches. I have a UITableView with custom cells containing two UILabels. On selecting the cell, a UIPicker is revealed, and a variable is set referencing which cell was tapped.</p>
  
  <p>Once a selection is made in the UIPicker, I need to take that value and use it to replace the existing .text of one of the cell labels. I have tried using .viewWithTag a few different ways (first tagging the label itself, then the entire cell) and nothing works.</p>
  
  <p>My didSelect for the picker is:</p>
  
  <pre><code>func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
          println("pickerView did select row \(row)")
  
          if(self.getStatus() == "newFirst"){
              switch (editingField){
              case 0:
                  var l:NewOrderCell! = tableView.viewWithTag(editingField) as? NewOrderCell
                  //the label in the custom cell is called 'Text'
                  l.Text.text = pickerData[row]
                  println("should be changing \(l.Text.text) into \(pickerData[row])")
              default:
                  var l:NewOrderCell! = tableView.viewWithTag(editingField) as? NewOrderCell
                  l.Text.text = pickerData[row]
              }
          }
          picker.hidden=true
      }
  </code></pre>
  
  <p>and my cellForRowAtIndexPath for the table is:</p>
  
  <pre><code>var cell:NewOrderCell = tableView.dequeueReusableCellWithIdentifier("NewOrderCell") as NewOrderCell
                  //label
                  cell.Label.text = self.newOrder[indexPath.row]
                  //text
                  cell.Text.text = "Please Select"
                  cell.tag = indexPath.row
                  return cell
  </code></pre>
  
  <p>I know my goal, but can't get a handle on the proper way to reference a cell within a table from another method. Thanks for your help</p>