How to reverse a BOOL in Objective C

Sometimes you need the opposite of a BOOL. This is actually easier than I had expected –

  • the opposite of YES is !YES
  • and the opposite of NO is !NO.

More examples here:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.