title: Swift - If text matches any string in array exactly
body: <p>I am trying to see if my UITextField.text matches any of the strings in my array exactly. As I am using letters I need to know if the text matches exactly and not just contains elements from the array.</p>
  
  <p>In the if statement I am not sure what to put after 'cameraBodies' to search over the whole array?</p>
  
  <p>Thank you for any help</p>
  
  <pre><code>let cameraBodies = ["A","B","C","D","E","F","G","H","I","J","K",
                      "L","M","N","O","P","Q","R","S","T","U","V",
                      "W","X","Y","Z","Other"]
  
  if cameraBodyTextField.text != cameraBodies (Here is the problem) {     
              print("Does not match")
          } else {    
              print("Does match")
          }
  }
  </code></pre>