I have read that the two are the same, but my code does not work if I use true/false
instead of YES/NO
. For example if I do
BOOL matchFound=false;
//...
//logic to change value of matchFound to `true` goes here
//...
if(!matchFound) NSLog(@"I did not find a match");
The above does not work properly. But if I change to using YES/NO, it works. Why is that?