compare a NSNumber with a fixed value?

Posted by fuzzygoat on Stack Overflow See other posts from Stack Overflow or by fuzzygoat
Published on 2010-03-11T19:51:07Z Indexed on 2010/03/11 19:54 UTC
Read the original article Hit count: 293

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa