Using Xcode 4.4 Converting to a Modern C Object Syntax, my calls [NSNumber numberWithBool:YES]have been converted to @(YES). I had a problem that I just forgot about, and changed it myself to @YES, which should be the correct syntax.
However, this gives me an error:
Unexpected type name "BOOL": expected expression
I know that there is an expression syntax, but I don’t understand why I can’t just use @YESand @NO.
NSDictionary *userDefaultsDefaults = @{@"hasBeenLaunched": @YES};
NSDictionary *userDefaultsDefaults = @{@"hasBeenLaunched": @(YES)};
Why is there no @(YES)compiling while @YES, and what can I do to fix it?
source
share