title: How does self.textField.delegate = self work in swift?
body: <p>I am working with keyboard resign features in iPhone app development. I would like to know why </p>
  
  <pre><code>self.textField.delegate = self 
  </code></pre>
  
  <p>needs to be included into the viewDidLoad of a viewController. I have tried to find reasons of this but no explanation has been clear so far. </p>