title: How to change parent view variable from "nilb cell"?
body: <p>Everyone:</p>
  <p>I have a simple collectionview, and registered a nib cell.</p>
  <p>What I want is : after textField value was changed, pass the value to parent viewController variable.</p>
  <p>I found some sugesstion for viewcontroller to viewcontroller, not what I want. Sorry, I just code with SWIFT.....</p>
  <p>Hear is my code:</p>
  <p>// ViewController</p>
  <pre><code>class ViewController: UIViewController {
  
      let cellid = &quot;cellid&quot;
      
      @IBOutlet weak var cv: UICollectionView!
      
      override func viewDidLoad() {
  
          super.viewDidLoad()
          cv.dataSource = self
          
          cv.delegate = self
          cv.register(UINib(nibName: &quot;CollectionViewCell&quot;,bundle: nil), forCellWithReuseIdentifier: cellid)
  
      }
  }
  </code></pre>
  <p>/// Nib Cell Class</p>
  <pre><code>class CollectionViewCell: UICollectionViewCell,UITextFieldDelegate {
  
      @IBOutlet weak var lblText: UITextField!
      
      override func awakeFromNib() {
          super.awakeFromNib()
          
          lblText.delegate = self
          
      }
  
      func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -&gt; Bool {
          
          // Make a input text check here and pass data to ViewController for save these data that user input!
          .....
          return true
  
      }
  
  }
  </code></pre>