title: Passing data between UIView and UIViewController
body: <p>Apologies beforehand if this already has an answer but I wasn't able to find the answer that I was looking for.</p>
  
  <p>I have been stuck on the best way to approach passing data from the UIView to the UIViewController. Let's suppose I have this form data with information the user has filled out. The data exists in the view via the individual UITextFields. How should I pass these information to the controller to perform validation and to create a post request with this data?</p>
  
  <p>Does it make sense to do this via a closure? Like the following:</p>
  
  <pre><code>@objc func submitFormData() {
      // call function passed via the view controller
  }
  </code></pre>
  
  <p>What is the best practises for passing data between the view and the controller? For your information, I am not using StoryBoard and I am creating everything programmatically.</p>
  
  <p>Answers would be greatly appreciated, thanks!</p>