title: How to get the changed value of UIPicker to be used for a Label? - Swift-3
body: <p>I have declared table cells and each cell I have added a label and a UIPicker. Once the UIPicker Value is changed, I would like to show the value in the label of the corresponding label.</p>
  
  <pre><code>class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UIPickerViewDelegate, UIPickerViewDataSource {
  
      @IBOutlet weak var myTable: UITableView!
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
  
      public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int{
          return 2
      }
  
  
      public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell{
  
          let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
  
          let picker = UIPickerView()
          let y = 200 * indexPath.row
          picker.frame = CGRect(x: 200, y: y, width: 100, height: 150)
          picker.delegate = self
          picker.dataSource = self
          picker.tag = indexPath.row
          view.addSubview(picker)
  
          let myLbl = UILabel()
          myLbl.frame = CGRect(x: 100, y: y, width: 80, height: 100)
          myLbl.backgroundColor = UIColor.gray
          myLbl.textColor = UIColor.white
          myLbl.textAlignment = .center
          myLbl.tag = indexPath.row
          myLbl.text = "hi" // I would like to show the value of the UI picker
          view.addSubview(myLbl)
  
          return cell
      }
  
      func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
          return 200
      }
  
  
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          print(indexPath.row)
          NotificationCenter.default.addObserver(self, selector: #selector(pickerChangeAction), name: NSNotification.Name("pickerChange"), object: self)
      }
  
      public func numberOfComponents(in pickerView: UIPickerView) -&gt; Int{
          return 1
      }
  
  
      public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int{
          return myData.count
      }
  
       public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String?{
  
          return myData[row]
  
  }
  
       public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int){
  
         NotificationCenter.default.post(name: NSNotification.Name("pickerChange"), object: self)
          print("Hello2")
      }
  
      func pickerChangeAction(){
          print("Hello1")
      }
  }
  </code></pre>