Is there a better way to compare a NSNumber with a fixed value, it just feels a little clunky.
if([myNumber isEqualToNumber:[NSNumber numberWithInt:0]]) NSLog(@"Zero");
I do know I can use -compare but it pretty much looks the same ...
gary
Is there a better way to compare a NSNumber with a fixed value, it just feels a little clunky.
if([myNumber isEqualToNumber:[NSNumber numberWithInt:0]]) NSLog(@"Zero");
I do know I can use -compare but it pretty much looks the same ...
gary
How about ([myNumber intValue] == 0)? (or < or >, obviously).