view raw
Moshe Moshe - 9 months ago 87
Objective-C Question

Objective-C formatting string for boolean?

What formatter is used for boolean values?



NSLog(@" ??", BOOL_VAL);
, what is


One way to do it is to convert to strings (since there are only two possibilities, it isn't hard):

NSLog(@" %s", BOOL_VAL ? "true" : "false");

I don't think there is a format specifier for boolean values.