title: Swift: Why does switching over textfields work?
body: <p>For example: </p>
  
  <pre><code>func textFieldDidBeginEditing(textField: UITextField) {
      switch textField {
      case stateField:
          print("editing state")
      case countryField:
          print("editing country")
      default:
          break
      }
  }
  </code></pre>
  
  <p>Is it because its looking at address for those fields? Is this a right way to use switch statement? </p>