title: how to add textfield delegate in swift
body: <p>I need to add delegate to textfields; my understanding is it can be done two ways:</p>
  
  <ol>
  <li>we go to file and viewController.swift and under class, after UIviewcontroller we add comma and then type UITextFieldDelegate .
  and then u under viewDidLoad we add method and function </li>
  <li>when on storyboard we click and drag textfield to small icon on top of view that says view controller and pick delegate</li>
  </ol>
  
  <p>Do they both work the same? or there is difference if we do one way or the other?
  and what you do if you have more than one textfields, I have 10 textfields and have 7 functions and buttons, I need to do this so I can disable button if my textfield is empty for that button.</p>