Possible Duplicate:
Objective c formatting string for boolean?
What NSLog
%
-specifier should be used to literally see YES
or NO
when printing a BOOL
?
BOOL var = YES;
NSLog(@"var = %@", (var ? @"YES" : @"NO"));
BOOL
is merely an alias (typedef) for signed char
.
The specifiers supported by NSLog are documented here.