You are currently comparing two pointers. Instead, use the NSNumber methods to actually compare them:
if([someNSNumberValue isEqualToNumber:[NSNumber numberWithBool:NO]]) {
To get the bool value from NSNumber , use -(BOOL)boolValue :
BOOL b = [num boolValue];
With this comparison will be easier to read for me this way:
if([num boolValue] == NO) {
Georg Fritzsche Mar 19 '10 at 16:43 2010-03-19 16:43
source share