How to reverse a BOOL in Objective C

- by

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

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

More examples here:



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

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