Tuesday, August 16, 2011

po [NSNumber numberWithBool:NO] Outputs 1

Bavarious:

[T]here’s a symbol called NO that was loaded onto the address 0x9374bc6a73a0a1. Since the address is different from 0, +numberWithBool: returns an NSNumber representing a true value.

But when you’re not in gdb, the value of NO is supplied by the preprocessor.

Comments RSS · Twitter

Leave a Comment