title: How do I compare the the text of a UITextField to a string?
body: <p>I am creating a scrambled word game that consists of 4 words, and therefore 4 textfields.  </p>
  
  <p>When the user inputs a string that is the length of the correct word, I want to check if that sequence is equal to the actual word.  </p>
  
  <pre><code> If it is, I want to clear the text field and return "YES!".
  
   If it is not, I want to clear the text field completely so the user can try again. 
  </code></pre>
  
  <p>Example: If the actual word is "LOGIC" and the user enters "GOLIC" as his guess for the correct word, I want the text field to clear completely so the user can try again.  </p>
  
  <pre><code>     If the actual word is "LOGIC" and the user enters "LOGIC", I want the text field to clear and display the string "YES!"
  </code></pre>
  
  <p>Any help is much appreciated!</p>