title: Assigning NSUInteger to BOOL conceptual understanding
body: <p>I am trying to look for a good answer to the concept of BOOL. As I understand, a zero is a false value, and non-zero is a true value. Thinking this I assigned string length into a BOOL variable. Now, this works fine for iOS > 6. On iOS 6 I see strange results. For string with odd length, isEnabled is turing True but for strings with even length, isEnabled is turing False.</p>
  
  <pre><code>BOOL isEnabled = myString.length;
  </code></pre>
  
  <p>Please help me understand this. Of course, now I've been assigning expressions to BOOL variable like this:</p>
  
  <pre><code>BOOL isEnabled = myString.length &gt; 0;
  </code></pre>
  
  <p>Exact code:</p>
  
  <pre><code>- (void)textViewDidChange:(UITextView *)iTextView {
      self.navigationItem.rightBarButtonItem.enabled = [[self.noteTextView.text trim] length];
  }
  </code></pre>
  
  <p>PS: As mentioned, myString is changing in length; from 'a' to 'ab' to 'abc' etc.</p>